DMD 0.148 - scope guard
Wang Zhen
nehzgnaw at gmail.com
Mon Feb 27 04:53:20 PST 2006
Walter Bright wrote:
> "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 :-(
>
>
How about
on_scope_exit -> scope exit
on_scope_success -> scope success
on_scope_failure -> scope failure
?
on_prefixed_underscore_separated_keywords just look obtrusive in D code.
More information about the Digitalmars-d
mailing list