On Saturday, 13 March 2021 at 21:15:40 UTC, Martin Nowak wrote:
Glad to announce D 2.096.0, ♥ to the 54 contributors.
This release comes with improved ABI compatibility for complex
types, clarified copy constructor and postblit interaction,
optional libunwind based backtraces, runtime-allocated global
synchronized mutexes, and a preview for shortened lambda-style
function definitions.
http://dlang.org/download.html
http://dlang.org/changelog/2.096.0.html
-Martin
Allow shortened function implementations for single-expresssion
functions.
-preview=shortenedMethods is added. This allows functions to be
written in a similar form to lambda functions:
// 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.