Worst ideas/features in programming languages?
Steven Schveighoffer
schveiguy at gmail.com
Tue Oct 12 11:39:56 UTC 2021
On 10/12/21 2:14 AM, bauss wrote:
> On Tuesday, 12 October 2021 at 03:17:08 UTC, SealabJaster wrote:
>>
>> `abc => { return 123; }` should not be returning a function that
>> returns a function.
>>
>
> I agree with this so much, like why couldn't it have been made so you
> had to be explicit if you wanted to return a function? Like:
>
> `abc => &{ return 123; }`
Just FYI, the `abc => {}` syntax is just recently deprecated.
https://dlang.org/changelog/2.098.0.html#ambiguous-lambda
-Steve
More information about the Digitalmars-d
mailing list