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.

Reply via email to