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

The big difference between the two is that Either/Result are trivial to compose and otherwise deal with in higher-order functions. Java has a massive problem whereby any API that invokes a callback has to either require that said callback not throw anything outside of a given short list of exceptions; or else declare both itself and the callback as "throws Exception", and force the API caller to deal with that - even though the specific callback that caller is passing in might not be throwing anything, or might be throwing a very specific exception only.


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

Search: