Lambda syntax for methods and functions

MattCoder mattcoder at hotmail.com
Sat Dec 7 09:43:45 PST 2013


On Saturday, 7 December 2013 at 17:29:43 UTC, bearophile wrote:
> 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); }

Maybe It's just me, but on the example above I don't see too much 
improvement:

1 word off ("return"), and "=>" instead of brackets.


More information about the Digitalmars-d mailing list