8 ms·
Alternately, it's like Haskell's monads, largely regarded as a workable solution. I think the key difference between checked exceptions and Rust's monadic erro
by pcwalton 12y ago
Alternately, it's like Haskell's monads, largely regarded as a workable solution.
I think the key difference between checked exceptions and Rust's monadic error handling is that it's very easy to just panic if you don't care about recovering from the error. In Java you have to write "try { ... } catch (IOException e) { throw new RuntimeException(e); }", which is very verbose, and it's a lot less code to just ignore the exception. In Rust it's just ".unwrap()".
- Dewie 12y agoMonads have become a borderline buzzword these days. You're obviously the expert on Rust here, but it feels like it would be sufficient to just call it errors-as-values.