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

Promises and monads are way different though. Promises are used for "simplifying" asynchronous coding in imperative languages, and monads are a general computational methodology towards writing syntactically imperative-looking code in purely functional languages, built on top of type-classes. Without understanding why Haskell is purely functional, you couldn't even understand the motivation behind monads. And sure, you can extend a javascript prototype (or any object) to do something monad like, but without all of Haskell's strictness, you'd miss the jest.



> monads are a general computational methodology towards writing syntactically imperative-looking code in purely functional languages

I think you are conflating "monadic do-syntax" and larger concept of monad (in Haskell and elsewhere).

Many constructs in Haskell (moands/comonads/applicatives/free/cofree etc.) are just it, constructs (drawn from theory), which happen to have interesting properties. And people keep finding interesting applications for them. Some of those applications are tested with time and hence are more familiar (f.x. effect ordering with monads).




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

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

Search: