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

Well, no, you're mistaken about Zig. There are custom panic handlers which are some kind of exceptions. I think Rust has something similar.


I'm not mistaken. Panic handlers are not any kind of exception.


I general I don't agree with that view, but indeed exceptions can be defined in different ways. An exception doesn't need to have a dedicated keyword or a glorified syntax to be one: if it's something that traverses the stack, has a handler or occurs on exceptional events, it's fair to call it an exception. A language doesn't have to support idiomatic use of exceptions for workflow control (such as C++) to have exceptions. Panic handlers, signals and interrupts might be defined exceptions as well. There are languages, such as Pony, that strive to have no runtime exceptions whatsoever. Not even panic handlers.




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

Search: