DMD 0.148 - scope guard

Cris central_p at hotmail.com
Mon Feb 27 00:47:25 PST 2006


Now you have just to persuade Walter Bright or to write your own 
compiler/language :)

Dawid Ciężarkiewicz wrote:
> Dawid Ciężarkiewicz wrote:
>> What do you think? Maybe later we'll come with better ideas.
> 
> VERSION I: (yeah, I know ...)
> 
> h3r3tic on #D channel said that VERSION H is too long and too switch-like.
> 
> This is hybrid of two concepts - verbose and informative "register" keyword
> and short usage without switch-like syntax.
> 
> void LongFunction()
> {
>     State save = UIElement.GetState();
>     register (scopepass) UIElement.SetState(save);
>     register (scopefail) UIElement.SetState(Failed(save));
>     ...lots of code...
> }
> 



More information about the Digitalmars-d mailing list