Hmm, is your own proposal stackful or stackless (the second sentence suggests stackless but it’s not completely clear)? My recollection of the general consensus from the other threads is that while stackful coroutines are more expressive and/or pleasant to use, they are not performant and “zero-cost” enough for “a systems language like Rust”, and in particular that they would not be appropriate to use for writing implementations of Iterator, which is one of the main use cases alongside async I/O.
Also, just by looking at your proposal without you telling me, from what could I determine for myself whether it’s stackful or stackless? As far as I’ve managed to understand these things so far, “stackless” means that only the top-level function/coroutine may yield (= invoke effects, IINM), while if it’s stackful, that function may call another, which may yield for both of them. (In the stackless proposals so far, they are clearly stackless because if one function which may yield wants to delegate to another function which may yield, the only way to do it is to invoke it in a loop with the outer function yielding every time the inner one does.) In your proposal, I believe (1) any function with a given effect may transparently call any other functions with that effect, which (2) implies that it’s stackful? Or am I mistaken about either of those?
Do you remember them well enough to say how closely your proposal corresponds to algebraic effects systems “from the literature” (I’m familiar with Frank and am reading about Koka in particular, fwiw), or, if there are some important differences, what those are?
(Just a few days ago I was trying to google for whether “algebraic effects” correspond to “stackful” or “stackless” coroutines, with literally zero useful results (does nobody else on the internet care about how these things relate to each other, or what?), but based on the same logic as above concluded that they are almost surely stackful…)