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

> It just seems like a trivial pattern.

It is a trivial pattern. But a powerful one.

> I'm all for investing in better primitives, but do these kinds of libraries really help vs implementing them from scratch with language primitives inside your (inevitably more complex) domain code?

Yes - the best way to build complex things is out of simple primitives. A lot of the time, making a custom type be a monad simplifies the logic - that is, you'd want to implement the monad operations (and support do notation) anyway. Calling them by their standard names makes it easier for other people to read your code, and being able to use generic library functions like traverse (which work for any monad) with your custom type is just a bonus.



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

Search: