One and a half colors
One and a half colors
Posted Dec 2, 2025 17:00 UTC (Tue) by smurf (subscriber, #17840)Parent article: Zig's new plan for asynchronous programs
So instead of function-marked-async-or-not you shlep an additional "io" parameter all around your call chain whenever something might or might not need to do anything async?
Doesn't seem much different from tagging everything you want to async-ize with "async" and "await" …
Also I'm interested in how zig plans to manage an event loop this way. I mean you need to save and restore the call stack somehow, and stacks may not exactly be small in a production setup.
