braceless with statements

Dr Machine Code jckj33 at gmail.com
Fri Nov 12 19:37:24 UTC 2021


On Friday, 12 November 2021 at 11:26:41 UTC, Imperatorn wrote:
> 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.

why not use rather ```version(none)``` and ```version(all)``` ?


More information about the Digitalmars-d mailing list