Re:Beginner's guide to error handling in Rust
by IshKebab on Sunday July 10, 2022 @03:16PM
(#32047950)
If you're happy with `Errorf()` in Go then you can just use `anyhow` in Rust. Same trade-off. Easy type-erased error handling.
I would recommend it for application code. For library code you should go the extra mile and use proper error types.
I think that Go's error handling is actually fine and most people are making a fuss about nothing, but even so Rust's error handling is clearly superior.
I would recommend it for application code. For library code you should go the extra mile and use proper error types.
I think that Go's error handling is actually fine and most people are making a fuss about nothing, but even so Rust's error handling is clearly superior.