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

The example of the exception being thrown late (essentially, an exception being a type of side-effect) is quite good.

Would it be fair to say that this is an advantage of the Haskell approach of (for example) encapsulating an operation that might fail inside a Maybe? You get to make the failure aspect explicitly part of a monad, and make sure you "know" where it's happening?



Well, Haskell also has something similar to the more traditional exceptions within the IO monad (ioError).




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: