Worst ideas/features in programming languages?

Paul Backus snarwin at gmail.com
Tue Oct 12 16:22:07 UTC 2021

On Tuesday, 12 October 2021 at 13:26:34 UTC, Steven Schveighoffer 
> On 10/12/21 8:42 AM, bauss wrote:
>> 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.
> What would you change it to?

IMO the actual answer here is to deprecate the `{ /* ... */ }` 
syntax for function literals entirely.

Not only is it confusing in the context of `=>` lambdas, it also 
creates a grammatical ambiguity between function literals and 
[block statements][1], which results in bugs like [issue 

[1]: https://dlang.org/spec/grammar.html#BlockStatement
[2]: https://issues.dlang.org/show_bug.cgi?id=21619

More information about the Digitalmars-d mailing list