2 ms·
As a Rust fan boy where the Error monad is used instead of exceptions, there are times where exceptions are nicer. One example is when using `map` and other fun
by epage 7y ago
As a Rust fan boy where the Error monad is used instead of exceptions, there are times where exceptions are nicer. One example is when using `map` and other functions on iterators. With exceptions, error reporting is out-of-bound. Without them, things get messier, see https://doc.rust-lang.org/stable/rust-by-example/error/iter_result.html https://doc.rust-lang.org/stable/rust-by-example/error/iter_...
I've got some ideas for siphoning off the errors to make them out of bound. Will need to experiment to see how ergonomic it is.