4 ms·
Here's a paragraph from Rust's book on error handling [1] (written by BurntSushi who write quite a lot of Go too): > You can think of error handling as using c
by gnuvince 10y ago
Here's a paragraph from Rust's book on error handling [1] (written by BurntSushi who write quite a lot of Go too):
> You can think of error handling as using case analysis to determine whether a computation was successful or not. As you will see, the key to ergonomic error handling is reducing the amount of explicit case analysis the programmer has to do while keeping code composable.
Yes, handling errors is important and should be done, however it need not result in a block of text that people just skim over and that is easy to get wrong.
[1] https://doc.rust-lang.org/book/error-handling.html https://doc.rust-lang.org/book/error-handling.html