Worst ideas/features in programming languages?

bauss jj_1337 at live.dk
Tue Oct 12 12:42:44 UTC 2021


On Tuesday, 12 October 2021 at 11:39:56 UTC, Steven Schveighoffer 
wrote:
> 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

Yeah, but I would rather that it was still allowed and that the 
semantics just changed.

But obviously for good reason that isn't happening since it would 
break existing code.


More information about the Digitalmars-d mailing list