Release D 2.096.0
starcanopy
starcanopy at protonmail.com
Sun Mar 14 18:25:51 UTC 2021
On Sunday, 14 March 2021 at 05:31:27 UTC, Max Haughton wrote:
> On Sunday, 14 March 2021 at 03:25:28 UTC, starcanopy wrote:
>> On Saturday, 13 March 2021 at 21:33:20 UTC, Meta wrote:
>>> On Saturday, 13 March 2021 at 21:15:40 UTC, Martin Nowak
>>> wrote:
>>>> [...]
>>>
>>> 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.
>>
>> It's pretty neat, but a DIP has to be drafted and approved for
>> it to be enabled by default, right? (Unless I missed it.)
>
> Correct. To be completely honest it shouldn't have ever been
> merged since there was no approval from WalTila and they steer
> the language.
Given your status as a member of the Foundation, is there a
plan/track of sorts to convert such a DIP-less -preview feature
to a full-fledged one? I know it's a lot of work to write an
improvement proposal, and deliberation with the community is a
seemingly tiring (but necessary) ordeal, but I'm concerned that
this feature will be in purgatory if its author becomes busy or
forgets about it. (Barring another individual assuming
proprietorship.)
More information about the Digitalmars-d-announce
mailing list