DMD 0.148 - scope guard

Walter Bright newshound at digitalmars.com
Sat Feb 25 20:46:27 PST 2006


"Tom" <Tom_member at pathlink.com> wrote in message 
news:dtrakc$6lo$1 at digitaldaemon.com...
> 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?

This article has some good examples: 
www.digitalmars.com/d/exception-safe.html
Also, do a google groups search on "Alexandrescu on_scope_exit" for a good 
thread on it.

>
> 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."

Thanks, I'll fix it. 





More information about the Digitalmars-d mailing list