3 ms·
Well, no, you're mistaken about Zig. There are custom panic handlers which are some kind of exceptions. I think Rust has something similar.
by kennykartman 10mo ago
Well, no, you're mistaken about Zig. There are custom panic handlers which are some kind of exceptions. I think Rust has something similar.
- jibal 10mo agoI'm not mistaken. Panic handlers are not any kind of exception.
- kennykartman 10mo agoI 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.