On Friday, December 20, 2013 10:30:06 bearophile wrote:
> kdmult:
> > this(int x, int y)
> > {
> > 
> >    this.x = x;
> >    this.y = y;
> > 
> > }
> 
> In D I prefer:
> 
> this(int x_, int y_) {
>      this.x = x_;
>      this.y = y_;
> }

Whereas I put the underscore before (e.g. _x), and some folks like to do m_x 
(though I haven't seen many people do that in D - more in C++). It doesn't 
really matter. But the typical naming conventions have types being 
PascalCased, and everything else being camelCased, so naming any variables 
with PascalCasing (or simply making them all uppercase) is definitely not the 
typical thing to do in D.

http://dlang.org/dstyle.html

- Jonathan M Davis

Reply via email to