Jump to page: 1 2
Thread overview
March 13
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

March 13
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

Thanks everyone 🎉
March 13
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.
March 14
On Saturday, 13 March 2021 at 21:33:20 UTC, Meta wrote:
>
> // 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.

Yeah, c# added this syntax awhile back and is nice to use at times, usually because I stumble on the property syntax.

https://www.google.com/amp/s/csharp.christiannagel.com/2017/01/25/expressionbodiedmembers/amp/
March 14
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.)
March 14
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.
March 14
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:
>>
>> 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.

I raised a similar concern before with something else (don't remember what it was), but apparently things can be merged without W&A's approval if they're behind a switch (in the opinion of at least some of the core maintainers, at least).
March 13
Thank you, Martin!
March 14
On Sunday, 14 March 2021 at 07:15:57 UTC, Meta wrote:
> 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:
>>>
>>> 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.
>
> I raised a similar concern before with something else (don't remember what it was), but apparently things can be merged without W&A's approval if they're behind a switch (in the opinion of at least some of the core maintainers, at least).

Yeah, iirc preview switches can be added without a DIP because it's not a part of the language per se. It's probably a reasonable approach, because otherwise you would get a multitude of forks instead.
March 14
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

Great!
« First   ‹ Prev
1 2