proposal: short => rewrite for function declarations
Sebastiaan Koppe
mail at skoppe.eu
Sat Oct 10 16:38:56 UTC 2020
On Friday, 9 October 2020 at 14:44:25 UTC, Adam D. Ruppe wrote:
> After a brief chat yesterday, I slapped this together:
>
> https://github.com/dlang/dmd/pull/11833
>
> One benefit is shorter property accessors:
>
> private int _x = 34;
> @property x() => _x;
> @property x(int v) => _x = v;
>
> So it just extends the existing lambda shorthand to full
> declarations too.
Obvious addition, don't understand much of the resistance. My
experience is that a lot of languages use => similarly.
More information about the Digitalmars-d
mailing list