bearophile wrote:
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.
But python doesn't do it either. Did you suggest the same thing to the
python devs? :-)
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