Re: generalizing hiding rules

2009-10-02 Thread Marianne Gagnon
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 > language? > > If one symbol leads to working code

Re: generalizing hiding rules

2009-10-02 Thread bearophile
Andrei Alexandrescu: > 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 > language? I agree that making D tidier in such regards is

generalizing hiding rules

2009-10-02 Thread Andrei Alexandrescu
I was just playing with some nested classes: class Base { int x; } class A { private int x, y; class B : Base { int z; this() { x = 42; y = 43; this.outer.x = 44; z = 45; } } } In the code above, if you just