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

You're right that you can't destructure until you've established which side of the union you got, does the tag help with that?

I like a Result type over an Either because it feels semantically more meaningful. I work with people with a wide range of background and a Result type is self explanatory, they can just read the code by themselves without knowing and understanding the convention of which side of the branch the error goes, etc...



I agree with you on the Result type being semantically more meaningful and I agree there are a lot of conventions to be remembered coming from functional programming that gets meta.

Thanks for the insight




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

Search: