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

> It’s not any more unnatural to do that than it is to code in any imperative language.

Yeah, I guess the `do` notation makes it pretty painless. If you start mixing monads, though, things get hairy quickly.




Monad Transformers aren't _that_ bad, the MTL style of doing things makes it all pretty painless.

It also provides a huge opportunity for testing. At a very high level, you describe all of your effects as a series of embedded, compostable DSLs that you define interpreters for. The awesome part is that you can switch out the interpreters at will, so you can, for example, replace something that handles network requests with something that returns dummy data almost effortlessly.


I think we have different pain thresholds. I would consider this very painful:

http://hackage.haskell.org/package/transformers-0.5.5.0/docs...

> It also provides a huge opportunity for testing. [...]

That's a neat point, thanks for bringing it up.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: