3 ms·
I think jyx was talking about the throw/try/catch mechanism[0] used for error handling, in contrast to error handling in e.g. Rust, where the idiomatic way of h
by mplanchard 2mo ago
I think jyx was talking about the throw/try/catch mechanism[0] used for error handling, in contrast to error handling in e.g. Rust, where the idiomatic way of handling an error is to return a Result enum, containing either a success value or an error type. The latter allows callers to know that a function can error, and what kind of error it can return. Exception-based error handling, on the other hand, means you cannot tell by way of the type system whether or what errors a function can throw.
[0]: https://github.com/abhiramasonny/jaithon/blob/main/LANGUAGE.md#errors https://github.com/abhiramasonny/jaithon/blob/main/LANGUAGE....
- AbhiramaVS 2mo agoAh yeah that makes more sense. Will look into this