Lambda syntax for methods and functions

bearophile bearophileHUGS at lycos.com
Sat Dec 7 09:29:42 PST 2013


 From this post:

http://adamralph.com/2013/12/06/ndc-diary-day-3/?1

Seems C# will gain this syntax:

public Point Move(int dx, int dy) => new Point(X + dx, Y + dy);

That means:

public Point Move(int dx, int dy) { return new Point(X + dx, Y + 
dy); }

Even Ada2012 has a similar syntax. I think it's worth having in D.

The ER:
https://d.puremagic.com/issues/show_bug.cgi?id=7176

Bye,
bearophile


More information about the Digitalmars-d mailing list