Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I started looking into Rust again while picking the term "union type" because of their choice to use the term "enum". I ran into the Result type in some code I was reading and it just made so much more sense to me as a new person learning the language. Basically, it made it self-evident to me that "a library for error handling should be named with error handling in mind." You will also see a Result type in some Haskell libraries so it's not unprecedented there.

I also got tired of explaining "the good result goes in Right, because it's 'Right'" like I'm endlessly telling a bad dad-joke.



Yeah, we used to have an Either type in the Rust std, but it was pretty much never used because we had Result.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: