Release D 2.096.0

Jesse Phillips Jesse.K.Phillips+D at gmail.com
Sun Mar 14 02:47:04 UTC 2021


On Saturday, 13 March 2021 at 21:33:20 UTC, Meta wrote:
>
> // these 2 are equivalent
> int foo() { return 1; }
> int foo() => 1;
> The syntax allows the form => expr to replace the function body 
> { return expr; }
>
> Amazing! I had no idea this got in. I love the syntax.

Yeah, c# added this syntax awhile back and is nice to use at 
times, usually because I stumble on the property syntax.

https://www.google.com/amp/s/csharp.christiannagel.com/2017/01/25/expressionbodiedmembers/amp/


More information about the Digitalmars-d-announce mailing list