Alias syntax removal
bearophile
bearophileHUGS at lycos.com
Sun Feb 10 06:38:43 PST 2013
kenji hara:
> This syntax never been valid in past, because alias declaration
> cannot make alias of an expression.
Right, sorry, my mistake.
> Now we can write alias declaration as follows:
>
> alias Integer = int;
> alias IntArray = int[];
>
> These syntax are continuously valid in 2.062.
OK. So they aren't going away as I have feared.
> But, while a discussion for the compiler fix, a wrong syntax
> change, which
> has similar look but definitely different meaning, had been
> introduced.
> https://github.com/D-Programming-Language/dmd/pull/1187
>
> struct S {
> int value;
> alias value this; // old syntax
> alias this = value; // new syntax, from 2.061
> }
>
> I opened the pull request #1413 in the beta term for 2.061, but
> it had
> _accidentally_ released without deeply discussion.
> https://github.com/D-Programming-Language/dmd/pull/1413
>
> I think and believe that we MUST reset things.
I see. Thank you for the work.
Bye,
bearophile
More information about the Digitalmars-d
mailing list