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

deadalnix deadalnix at gmail.com
Fri Feb 22 08:47:57 PST 2013


On Friday, 22 February 2013 at 15:31:43 UTC, Martin wrote:
> On Friday, 22 February 2013 at 15:07:29 UTC, deadalnix wrote:
>> On Friday, 22 February 2013 at 14:58:02 UTC, Martin wrote:
>>> On Friday, 22 February 2013 at 14:55:19 UTC, bearophile wrote:
>>>> Martin:
>>>>
>>>>> 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.


More information about the Digitalmars-d mailing list