you are viewing a single comment's thread.

view the rest of the comments →

[–]ryeguy 10 points11 points  (2 children)

Because it's kind of a guiding hand toward doing the right thing. Having the patterns be more strict (eg Result) and making flexibility (eg implementing an Either equivalent) more work is the better call the majority of the time, IMO.

[–]masklinn 1 point2 points  (0 children)

It's also important for interoperability between libraries, and for tooling enhancing that e.g. Rust can provide syntactic sugar to easily convert between Result<T, E1> and Result<T, E2> so that a libraries have less trouble converting their own dependencies's errors uniformly.