DMD 0.148 - scope guard

Stewart Gordon smjg_1998 at yahoo.com
Tue Feb 28 08:15:01 PST 2006


Chris Miller wrote:
<snip>
> scope(exit)  foo();
> scope(success)  bar();
> scope(failure)  baz();
> 
> similar to extern(name), pragma(name), etc, requires one `scope` 
> keyword, name in () doesn't need to be a keyword but is still treated 
> special, and doesn't look bad.

The scope(exit) notation gets me thinking, considering that all three of 
them are on exit from the scope.  Not that I can think of anything 
better....

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