why scope(success)?

Stewart Gordon smjg_1998 at yahoo.com
Thu May 11 08:17:11 PDT 2006


James Dunne wrote:
<snip>
> Then the implementation according to D's language specs is incorrect. 
> Nothing is mentioned about new scopes created by if-statements or 
> while-statements.  New scopes are only created from block { } statements 
> when inside a function body.  Scope is mentioned (in passing) for the 
> for-statement; the initializer is noted as a special case.  Did I miss a 
> blanket statement somewhere else in the docs about this?

I think you're meant to use a bit of common sense here.  What sense does 
it make for a declaration to be conditional at runtime?

To be honest, I think a naked declaration as the body of a runtime 
control statement should be illegal.

Stewart.

-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/M d- s:-@ C++@ a->--- UB@ P+ L E@ W++@ N+++ o K-@ w++@ O? M V? PS- 
PE- Y? PGP- t- 5? X? R b DI? D G e++++ h-- r-- !y
------END GEEK CODE BLOCK------

My e-mail is valid but not my primary mailbox.  Please keep replies on 
the 'group where everyone may benefit.



More information about the Digitalmars-d mailing list