Also Go: exceptions aren’t real, you declare and handle every error at every level or declare that you might return that error because go fuck yourself.
It’s better than “invisible” exceptions, but it’s still the worst “better” version. The best solution is some version of the good old Result monad. Rust has the BEST error handling (at least in the languages i know). You must handle Errors, BUT they are just values, AND there’s a easy, non-verbose way of passing on the error (the ? operator).
Also Go: exceptions aren’t real, you declare and handle every error at every level or declare that you might return that error because go fuck yourself.
Because that’s sane and readable?
It’s better than “invisible” exceptions, but it’s still the worst “better” version. The best solution is some version of the good old Result monad. Rust has the BEST error handling (at least in the languages i know). You must handle Errors, BUT they are just values, AND there’s a easy, non-verbose way of passing on the error (the ? operator).