Hacker News new | ask | show | jobs
by janslow 1742 days ago
Agreed. I wasn't originally a fan of Go's error handling, but I do find it forces me to explicitly handle the error, I very rarely use a plain `return err` statement, instead wrapping it with additional parameters.

Whereas when I use Rust's Result types, I tend to not add any additional context with `map_err` (until I need to investigate the cause of an error and have to retrofit it).

There's still definite room for improvement though (I think the Go 2 proposal will help a lot).