Discussion Thread: DIP 1043--Shortened Method Syntax--Community Review Round 1

Paul Backus snarwin at gmail.com
Sat Feb 5 14:10:51 UTC 2022


On Saturday, 5 February 2022 at 08:12:32 UTC, forkit wrote:
> It is clear that the D programming language is really more 'a 
> collection of dialects', including those whose only real value, 
> is that they save you a few keystrokes.
>
> That's the upside of the proposal I assume?
>
> The downside, is the additional cognitive load.

D already supports this shortened syntax for anonymous functions:

     (int x) { return x + 1; }
     (int x) => x + 1

So, allowing it for named functions too is a logical extension of 
a language feature that already exists.


More information about the Digitalmars-d mailing list