DMD 0.148 - scope guard

Tom Tom_member at pathlink.com
Sat Feb 25 20:25:48 PST 2006


In article <dtr2fg$2vqr$4 at digitaldaemon.com>, Walter Bright says...
>
>Scope guards are a novel feature no other language has. They're based on 
>Andrei Alexandrescu's scope guard macros, which have led to considerable 
>interest in the idea. Check out the article 
>www.digitalmars.com/d/exception-safe.html

Again the release is very nice!

A question: I seemed to miss the scope guard discussion (whatever). Can you
enlighten me with an example (or guide me with a link) to illustrate the
usefulness of this feature?

Thanks,

P.S.: In the new docs for the scope guard stuff there is a TYPO at "[snip] close
of the scope, they also are interleaved with the OnScopeStatements in the
reverse *lexeical* order in which they appear."

Tom;



More information about the Digitalmars-d mailing list