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.
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.
[1]: http://joeduffyblog.com/2016/02/07/the-error-model/