On 2013-12-20 10:15, Boyd wrote:
I'm in the process of adapting my library to the D standard naming
convention.
The problem is that I used to separate member variables and local
variables through capitalization.
X would be a member variable.
x would be a local variable.
this allowed me, among
On 2013-12-20 12:16, Boyd wrote:
What does m_ stand for anyway?
"member" I would guess.
--
/Jacob Carlborg
On Friday, 20 December 2013 at 09:30:08 UTC, 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_;
}
Bye,
bearophile
I tend to use the opposite for private/protected member variables
as per the
On Friday, 20 December 2013 at 10:29:26 UTC, Jeremy DeHaan wrote:
On Friday, 20 December 2013 at 10:06:36 UTC, Jonathan M Davis
wrote:
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++).
I tend to use th
On Friday, 20 December 2013 at 10:06:36 UTC, Jonathan M Davis
wrote:
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++).
I tend to use the m_x naming convention, though I limit it to
private member varia
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 f
On Friday, 20 December 2013 at 09:30:08 UTC, 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_;
}
Bye,
bearophile
I concur. And I should probably get used to using 'this' a lot as
well.
Ma
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_;
}
Bye,
bearophile
On Friday, 20 December 2013 at 09:15:26 UTC, Boyd wrote:
this(int x, int y)
{
X = x;
Y = y;
}
So now my question is, how do you distinguish between member
and local vars in such cases?
this(int x, int y)
{
this.x = x;
this.y = y;
}
I'm in the process of adapting my library to the D standard
naming convention.
The problem is that I used to separate member variables and local
variables through capitalization.
X would be a member variable.
x would be a local variable.
this allowed me, among other things, to create constru
10 matches
Mail list logo