3 ms·
The comparison of Rust's errors-by-return-values to Go's is really off-base.
by kenko 11y ago
The comparison of Rust's errors-by-return-values to Go's is really off-base.
- onetwotree 11y agoExactly, between a powerful type system and macros like try!, you're basically rolling on the same level as Haskell and other advanced languages in Rust.
- rspeer 11y agoI'd say you should hold off on that claim until Rust errors are composable (RFC #243). I know it's close. The macros aren't quite up to the job of safely coping with the tangle of different errors that different libraries can return without writing Go-like error handlers yet.
- jonreem 11y agoI disagree. The RFC you are citing is effectively just syntax sugar baking the `try!` macro into the language; it doesn't allow you to express anything you couldn't express today with `try!` and closures.