Error values suffer from the pit of failure. If you forget to handle them correctly, you have a bug. See [1].
Exceptions are better than async because they do not "reify" stack frames, an incredibly terrible idea. I mean, it works, but it's not a good model, mentally or otherwise.
Re:Some Thoughts on Zig
by Schroedingersat on Monday July 25, 2022 @11:54PM
(#32234064)
> Error values suffer from the pit of failure. If you forget to handle them correctly, you have a bug. See [1].
Then you put your value behind the error in the type...like rust or zig where you cannot ignore them.
You keep describing the upsides of Zig's error system as reasons why something else is better.
Ie. Zig's error system which is not based on algebraic effects is best in class.
Async does carry that same cost, but it comes with capabilities you can't get otherwise and is optional. Any objections to it are a demonstration of my point, not a disagreement with it.