Few things II

Bruno Medeiros brunodomedeiros+spam at com.gmail
Thu Aug 9 06:20:14 PDT 2007


Sean Kelly wrote:
> bearophile wrote:
> 
>> ----------------------
>>
>> 12) I have seen D allows to pass anonymous functions like:
>> (int x){return x*x;}
>>
>> C# V.3.0 uses a more synthetic syntax:
>> x => x*x
> 
> Crazy.  Who knew C# had functional influences.
> 

I think some amount of people in the NG knew that already :)
There were several mentions of it some time ago (more than year), 
somewhere after the time C# 3.0 was announced and being discussed. But 
that is just the short (and "templated") syntax for delegates, C# 2.0 
already supports delegate literals, with a syntax nearly identical to D, 
and with full support for outer variables (ie, detects outer variables 
and allocates them in heap instead of the stack).

-- 
Bruno Medeiros - MSc in CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D



More information about the Digitalmars-d mailing list