Which patches/mods exists for current versions of the DMD parser?

Peter Alexander via Digitalmars-d digitalmars-d at puremagic.com
Thu Sep 11 13:02:20 PDT 2014


On Monday, 8 September 2014 at 15:25:11 UTC, Timon Gehr wrote:
> On 09/08/2014 10:51 AM, "Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= 
> <ola.fosheim.grostad+dlang at gmail.com>" wrote:
>>
>> What kind of syntactical sugar do you feel is missing in D?
>
> int square(int x)=>x*x;

Unfortunately we still can't just write:

alias square = x => x * x;

but you can do this:

alias id(alias A) = A;
alias square = id!(x => x * x);


More information about the Digitalmars-d mailing list