DIP 1003: remove `body` as a keyword
Sönke Ludwig via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Thu Nov 24 03:35:16 PST 2016
Am 23.11.2016 um 21:32 schrieb Timon Gehr:
> On 23.11.2016 11:15, Sönke Ludwig wrote:
>>
>> scope (exit) { assert(n > 0); }
>> {
>> n += 1;
>> }
>
> This is not a counterexample, because the block statement following the
> scope statement is not part of the scope statement. I.e. if anything, it
> is bad that this looks similar, because it is grammatically different.
The function body isn't part of the "in"/"out" contract either. I don't
see the point here.
> (Also, in my code there are usually exactly zero block statements nested
> directly in block statements.)
The whole topic in general so far seems to be mainly hinged around
personal taste (me included). Not sure if we'll be able to reach consent
for anything but option 1.
More information about the Digitalmars-d-announce
mailing list