generalizing hiding rules
auria.mg at gmail.com
Fri Oct 2 12:59:13 PDT 2009
Andrei Alexandrescu Wrote:
> Disallowing hiding vertically in nested scopes has been quite
> successful. Also, D's no-hijack stance is also shaping up to be a hit. I
> am therefore thinking - why not apply the no-hijack rule throughout the
> If one symbol leads to working code through two different lookups, an
> ambiguity error would be issued. The only exception would be if one
> symbol is scoped and the other is at module scope (for the reasons I
> discussed in another post).
> I wonder to what extent this would break modular code, or foster more
> intelligible code. With this rule in tow, A.B.this() would have to use
> Base.x and this.outer.x to access the two x's.
Count my vote in favor of this change.
More information about the Digitalmars-d