3 ms·
I think Rust got this right, too. No Exceptions, but a Result<R,E> enum return type and the compiler forces you to handle the error case as well by doing exhaus
by MrBuddyCasino 8y ago
I think Rust got this right, too. No Exceptions, but a Result<R,E> enum return type and the compiler forces you to handle the error case as well by doing exhaustiveness checks.
- macintux 8y agoDoesn't that lead to a lot of error handling code? Another nice feature of the Erlang model is that, often, you can code the happy path and forget the error checking. Makes for much tighter/cleaner/easier-to-read code.
- jjnoakes 8y agoIn many cases the question mark operator can propagate errors for you. It is both explicit and non-verbose.