4 ms·
I am not an expert on this either, although very interested. Note that delimited continuations, which are a superset of coroutines are identical to effects in t
by nsm 2y ago
I am not an expert on this either, although very interested. Note that delimited continuations, which are a superset of coroutines are identical to effects in the sense of yielding control to the handler, not the caller. In languages like Racket/Scheme which allows associating tags with handlers, you can also model the same function having multiple effects.
In general, coroutines seem vastly easier to understand/type compared to effects unless your language can do a lot of effect inference.