String lambdas

ag0aep6g via Digitalmars-d digitalmars-d at puremagic.com
Sun May 1 22:19:45 PDT 2016


On 02.05.2016 02:17, Jonathan M Davis via Digitalmars-d wrote:
> So, at some point there was a discussion or two or introducing a shorter
> lambda syntax, and we ended up adding the syntax which is currently used
> which (as I understand it) is the same as what C# uses,

There is a difference. `x => {foo(x);}` has a different meaning in D 
than in C#. C#'s meaning is expressed with `(x) {foo(x);}` in D, and D's 
meaning is `x => () => {foo(x);}` in C#.


More information about the Digitalmars-d mailing list