Discussion on Go and D

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Apr 8 17:25:32 PDT 2012


On 4/8/12 7:21 PM, Andrej Mitrovic wrote:
> On 4/9/12, Andrei Alexandrescu<SeeWebsiteForEmail at erdani.org>  wrote:
>> and pass-by-alias
>
> Speaking of alias, one killer feature would be to enable using alias
> for expressions. E.g.:
>
> struct Window { struct Point { int x, y; } Point point; }
> void test() {
>      Window window;
>      alias window.point.x x;
>      // use 'x' here which is really window.point.x
> }

Yah, we should add that at some point. Walter and I discussed about it 
and it's virtually approved. But to be on the conservative side, it's 
not for expressions but for mere pointer-chasing chains.

Andrei



More information about the Digitalmars-d mailing list