For me, the gold standard in error handling is Rust, where the type system simply does not allow you to ignore errors. This means that the existence of error handling is checked at compile time. Of course, this doesn't mean your error handling is _good_, but I think that's beyond any language design to enforce.
But the Rust system is entirely built around a generic Result type, where both the non-error result (an int, string, struct, etc.) _and_ the error type itself are both generic.
Which is excellent.
the gold standard in error handling is Rust
Really? What library is in fashion this week for handling errors? I have so far used vanilla Rust, error-chain and Failure.
Seems like there is so much choice to improve the gold standard:
https://blog.yoshuawuyts.com/error-handling-survey/#librarie...
Personally I'm glad Go has stayed out of exceptions (panics don't count), at scale it's so much easier to reason about flow.
• https://github.com/rebeccaskinner/gofpher
• https://speakerdeck.com/rebeccaskinner/monadic-error-handlin...
I've been talking to the local Go user group. No one even knows about that concept. This continues a pattern of general ignorance/lack of looking beyond one's horizon I've noticed.
Things like generics and garbage collection involve some deep tradeoffs, so I get Go's take on them, even if I don't necessarily agree with it. On the other hand IMHO Go's crappy error handling boilerplate is not something I find acceptable in a modern programming language.