@pcwalton do you mean zero-cost if you don't use it?
Is there any way to implement Go-like "defer" in a zero-cost way, like RAII? I don't see any way to do it.
-
-
-
.
@samth Right, zero bookkeeping cost in the no-throw (no-panic) path. - 10 more replies
New conversation -
-
-
@pcwalton In your context can the code to exec on scope exit only be determined at runtime (as opposed to at compile time as in RAII)? -
@robknight_ Whether the deferred code runs depends on runtime behavior.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.