4 ms·
Exception is hidden control flow, where as error values are not. That is the main reason why zig doesn’t have exceptions.
by pyrolistical 11mo ago
Exception is hidden control flow, where as error values are not.
That is the main reason why zig doesn’t have exceptions.
- bigstrat2003 11mo agoCorrection: unchecked exceptions are hidden control flow. Checked exceptions are quite visible, and I think that more languages should use them as a result.
- nomel 11mo agoI'd categorize them more as "event handlers" than "hidden". You can't know where the execution will go at a lower level, but that's the entire point: you don't care. You put the handlers at the points where you care.