Revised RFC on range design for D2
Jason House
jason.james.house at gmail.com
Sat Sep 27 10:58:48 PDT 2008
Sergey Gromov wrote:
> Do you have a clear understanding of how name resolution should work in
> 'unified call syntax' as it is now?
>
> bool even(char[] a) {...}
> class Foo
> {
> private OptimizedEvenComputer ec;
> bool even(char[] a) {return ec.even(a);}
> void foo()
> {
> bool even(char[] a) {...}
> char[] l;
> auto x = l.even;
> auto y = even(l);
> }
> }
I would really hope that the D2 compiler would flag Foo.foo.even as a
shadowing violation. I am not a D2 user yet, but I'd hope that Foo.even and
Foo.foo.even would not override l.even; it just seems too error prone.
More information about the Digitalmars-d-announce
mailing list