Lambda syntax for methods and functions

Jesse Phillips Jesse.K.Phillips+D at gmail.com
Sat Dec 7 12:21:03 PST 2013


On Saturday, 7 December 2013 at 17:43:46 UTC, MattCoder wrote:
> 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.

You've pretty much just summed up the argument not to introduce 
lambda syntax. It has been proven wrong.


More information about the Digitalmars-d mailing list