What happened to the alias this = identifier syntax in 2.062?

Michael pr at m1xa.com
Fri Feb 22 11:17:24 PST 2013


>>>>>> Was something changed intentionally or is this a bug?
>>>>>
>>>>> It was changed intentionally, but only for alias this. That 
>>>>> syntax is allowed still for other aliases.
>>>>>
>>>>> Bye,
>>>>> bearophile
>>>>
>>>> I see, thanks. What was the reason for not allowing alias 
>>>> this = identifier?
>>>
>>> Requiring lookahead when parsing.
>>
>> Alright, thanks!
>
> Just to be clear : that was sarcastic, requiring lookahead when 
> parsing is a drawback.
>
> The idea is that alias and alias this are 2 different beasts. 
> For instance you can have multiple alias this when you can only 
> have one name per identifier.
>
> It was wanted to distinguish the 2 with 2 different syntaxes.

alias, alias this, "alias not for this" and "maybe not alias" 
requested.
Three changes in three versions, what the next?

Yes, it's small changes, but really annoying.

What the problem for multiple "alias this"?

alias this = i;
alias this = y;

and

alias i this;
alias y this;

+1 for first sample: all aliases in one way.


More information about the Digitalmars-d mailing list