Redundancies often reveal bugs

Peter Alexander peter.alexander.au at gmail.com
Fri Oct 1 00:50:13 PDT 2010


> I dont know if it is, but IMO it really should be an error to declare local
> variables that hide member variables.

I disagree. I always do that in constructors:

int x, y;
this(int x, int y)
{
  this.x = x;
  this.y = y;
}

I think you would annoy a lot of people if it was forbidden.


More information about the Digitalmars-d mailing list