Got it. Also what are the semantics if you trigger...
# announcements
d
Got it. Also what are the semantics if you trigger an exception in one of the deferred lambdas? I hope you would absorb the exception and execute all the lambdas. Also I would expect the deferred lambdas to be executed in LIFO order.
g
Nothing prevents you to implement
withDefer
according to your description. Also check this https://discuss.kotlinlang.org/t/is-gos-defer-possible-in-kotlin/625#5511629