Re:Algebraic Effects for the Rest of Us
by TuringTest on Wednesday July 24, 2019 @04:04AM
(#20513142)
Or "structured" coroutines, which jump to a previously established handler? In the _enumerateFiles_ example, control keeps jumping between that routine and the different procedures declared in the handler, which take care of different needed functions.
Also, on another note, it's not really true that "things in the middle don’t need to concern themselves with error handling". That's what exception-safety is about. You very much do need to concern yourself with exception handling if you want to allow the possibility of a caller handling a callee's exception. Also see [2].
[1] https://docs.microsoft.com/en-us/windows/win32/debug/excepti...
[2] https://devblogs.microsoft.com/oldnewthing/20120910-00/?p=66...