DMD 1.039 and 2.023 releases

Walter Bright newshound1 at digitalmars.com
Wed Jan 7 20:42:22 PST 2009


Brad Roberts wrote:
> Jason House wrote:
>> I don't think this answers their question. What curly braces mean
>> after a label is clearly a design decision that you made when writing
>> D. It seems that the choice is the opposite of what people expect.
>> Can you explain why it should be NonScope?
> 
> Restating in the form of a question... When would you _ever_ want {...}
> to not form a scope?

version (foo)
{
     int i;
}
...
version (foo)
{
     bar(i);
}

Writing labeled block statements is something more likely to be 
generated by an automated D code generator, and it's convenient to be 
able to control if a scope is generated or not.


More information about the Digitalmars-d-announce mailing list