Should scope(exit) be valid outside of a scope?

Jesse Phillips jessekphillips+D at gmail.com
Wed May 12 07:13:04 PDT 2010


Simen kjaeraas wrote:

> "Warnings are not a defined part of the D Programming Language."[1]
>
> Scope(whatever) as the only piece of code inside a scope is as useless
> as wings on an elephant. There might be cases, however, where generated
> code would create just that, and thus mayhap it should be just a warning.
> Or, one could make it an error if 'staches[2] are omitted. In this
> case, generated code should have no problems, and it serves to highlight
> that even without 'staches, if introduces a scope.
>
> [1]: http://www.digitalmars.com/d/2.0/warnings.html
> [2]: Also known as curly brackets - '{' and '}'

Best I could tell, Don was only looking at making it an error when you
leave out {}. I don't support it as an error if {} are surrounding it.


More information about the Digitalmars-d mailing list