DMD 0.148 - scope guard
Walter Bright
newshound at digitalmars.com
Sun Feb 26 23:24:16 PST 2006
"Miles" <_______ at _______.____> wrote in message
news:dtu8ic$i0t$1 at digitaldaemon.com...
> Walter Bright wrote:
>> finally does work for on_scope_exit, but it leaves on_scope_success and
>> on_scope_failure hanging.
>
> on_scope_exit -> finally { ... }
> on_scope_success -> finally(true) { ... }
> on_scope_failure -> finally(false) { ... }
>
> on_scope_exit -> finally { ... }
> on_scope_success -> finally(success) { ... }
> on_scope_failure -> finally(failure) { ... }
>
> on_scope_exit -> finally { ... }
> on_scope_success -> finally("success") { ... }
> on_scope_failure -> finally("failure") { ... }
>
> on_scope_exit -> finally { ... }
> on_scope_success -> finally return { ... }
> on_scope_failure -> finally throw { ... }
I don't think those are much better :-(
More information about the Digitalmars-d
mailing list