Post #2165146
2026-05-07 16:01 UTC
@joe@f.duriansoftware.com I guess without having separate stacks or Rust-style monomorphization, shallow generators are much more straightforward to support than full generators?
Do you think that the right way to handle error effects is to treat them as values but with an optimized ABI, rather than doing some form of stack unwinding?
Replies (1)
-
@joe@f.duriansoftware.com 2026-05-07 16:07
@zwarich@hachyderm.io yeah that's how metaware's c compiler did generators back in the day, they were implemented as nested functions, so they were strictly scoped and you could nonlocal jump up out of them but not back in, nor reify the ongoing context "error with an optimized ABI" seems like a good way to go. if it weren't for pesky return branch prediction it would be cool to experiment with multiple return addresses so you didn't need to have a caller-side branch after every call