Hacker News new | past | comments | ask | show | jobs | submit login

> If you are not trying to use Haskell (...) then what is the point having monads?

I'm not sure how to answer this question, as my previous comment actually is the answer to your question.

Promises are a great example. They are a mechanism that provides better encapsulation and is still easier to compose than using pure callbacks.

(IIRC, Haskell made a similar transition: Monads haven't been in Haskell forever, many other ways have been tried before, but in the end turned out to be quite cumbersome and ugly in larger code bases. The introduction of monads was generally perceived as relieve in Haskell, and are becoming more and more popular in other non-lazy functional languages as well, such as OCaml.)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: