Worst ideas/features in programming languages?

user1234 user1234 at 12.de
Tue Oct 12 16:11:18 UTC 2021


On Tuesday, 12 October 2021 at 06:14:40 UTC, 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; }`

But you are do it explicitly, use the more verbose syntax:

```
alias a = abc => function{ return 123; };
```

Also you have warning now

> Deprecation: Using `(args) => { ... }` to create a delegate 
> that returns a delegate is error-prone.



More information about the Digitalmars-d mailing list