Shadowing of members
Jacob Carlborg
doob at me.com
Wed Jan 9 23:42:16 PST 2013
On 2013-01-10 04:38, Jonathan M Davis wrote:
> 2. Do you honestly think that it's not incredibly common to declare
> constructor parameters to have the same names as the member variables that
> they go with? Who _doesn't_ do it that way? The only thing that would mitigate
> how often it would be warned about would be how many POD types in D get away
> without needing to define constructor, because one is implicitly declared. It's
> incredibly common practice in C++, Java. C#, etc. to name constructor
> parameters after the member variables that they go with. If anything, it's
> rare _not_ to do that (aside from private member variables often having stuff
> like _ or m_ added to them).
I do it all the time.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list