Arguments and attributes with the same name
bearophile
bearophileHUGS at lycos.com
Thu Mar 4 07:38:31 PST 2010
Ary Borenszweig:
> So you suggest to forbid having an argument name that
> matches an attribute name? Or require this. for attribute access?
I prefer the compiler to give an error when an argument has the same name of an attribute, it's tidier.
If you think that solution is too much restricting, there's a second solution: in only those case, where there can be ambiguity for the eyes of a programmer the compiler can require the use of "this.".
Bye,
bearophile
More information about the Digitalmars-d
mailing list