> > In this case we have try-finally statements as an existing feature. The > semantics of this feature is a bounded execution scope with a cleanup > action on completion. This feature is widely used and has always been > internally consistent and reliable, expect for catastrophic external > failure or intervention (ie, externally imposed process termination, power > failure, etc). People use it for all sorts of things, including bounded > resource management. >
Zeroing in on "cleanup action on completion": don't co-routines by nature prohibit us from reasoning in this way about completion? It seems to me that this shift is broader than just `try/finally`, although I agree that `try/finally` shows some particularly acute symptoms. And I also agree that we should not provide gratuitous footguns. Unfortunately, though, I'm having a hard time forming an opinion on how disallowing `try/yield/finally` would balance out.
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

