News for hackers. Stuff that matters.
Re:Some Thoughts on Zig by Schroedingersat on Monday July 25, 2022 @08:02PM (#32232603)
That's the entire point I'm making though...exception style semantics are the worst way of handling errors. Algebraic effects make it a little better. Error values are much better as a default paradigm.

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.

Re:Some Thoughts on Zig by ghoward on Monday July 25, 2022 @10:49PM (#32233695)
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.

[1]: http://joeduffyblog.com/2016/02/07/the-error-model/

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.