https://issues.dlang.org/show_bug.cgi?id=7176
--- Comment #20 from Nick Treleaven <[email protected]> --- Just noticed C# 6.0 has this syntax, they call it "Expression Body Definitions": https://msdn.microsoft.com/en-us/library/ms173114.aspx#Anchor_6 C# also has the same (x, y) => x == y lambda syntax as D. C# having this feature indicates the syntax may be worth adding. Regarding function syntax consistency, we now allow lambdas to be used with alias: alias square = x => x ^ 2; auto square(T)(T x) => x ^ 2; // proposed auto square(T)(T x) {return x ^ 2;} The proposed function definition syntax would be more consistent with the alias (and more flexible than alias). The main point of this request IMO is to reduce brace nesting, braces and brackets are visually noisy and make the programmer have to mentally match them up. --
