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

> Take Haskell, for example

Yes!

> Instead, you defer any handling of failures to the end of the chain

That's a choice. You can also do it immediately.

Also, no warped control flow: just regular "call-return" flows.

> What you’re not doing in any of those alternatives is explicitly checking the return value after each function call and handling any failure immediately right in the middle of your default execution path.

Like said, that's a choice. You can setup monadic handling, you can do each by itself. It depends on the situation what you use: but the DEFAULT is each by itself.

> As another example, Rust

Still the control flow remains intact. While Exceptions mess with control flow.



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

Search: