Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Exception is hidden control flow, where as error values are not.

That is the main reason why zig doesn’t have exceptions.



Correction: unchecked exceptions are hidden control flow. Checked exceptions are quite visible, and I think that more languages should use them as a result.


I'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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: