braceless with statements

Imperatorn johan_forsberg_86 at hotmail.com
Fri Nov 12 11:26:41 UTC 2021


On Friday, 12 November 2021 at 11:05:54 UTC, Dennis wrote:
> On Friday, 12 November 2021 at 10:55:21 UTC, Stefan Koch wrote:
>> It is a really simple patch and I think it's worthwhile to 
>> have this in the main language.
>
> How about other statements, like `if`, `for`, `foreach`, 
> `switch`? When extending `attribute:` syntax to statements, 
> might as well include all of them for consistency. N.b. this is 
> already allowed in global scope:
> ```D
> static if (true):
> ```
> Not in function scope though.

static if (true) should be banned from existence, use comments or 
delete if false.


More information about the Digitalmars-d mailing list