Hacker News new | ask | show | jobs
by Kolja 2171 days ago
I think Zig's error handling is even better: https://ziglang.org/#toc-A-fresh-take-on-error-handling

Return values are a pair of an error value (internally basically an enum) and a result value. Error handling is mandatory, but passing errors to the caller from a nested function can be done by prefixing with `try`.

IIRC, Swift is similar.