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

I don't see why that should be the case though (apart from the prolification of bad, overwrought, explanations).

Monads are not that exotic. People present it as "deep math" but for a mathematician for example it's kids stuff at the level you need to understand them for Haskell et al.

It's like saying differential equations are some "deep voodoo math" (only monads are even simpler).




I think the bad, overwrought explanations are the whole reason.

Yes, they're much simpler than differential equations. But the difference is, differential equations are the simplest way to solve some difficult problems -- monads are often the gratuitously complex way to solve simple problems.


Monads are simple ways to solve simple problems.

Consider the Maybe monad - it encodes optional values in a simple way. The approach before this is to have something called "null" that would wreck your programs. Maybe monad is one of the best improvements to day-to-day programming tasks that I've personally experienced in my lifetime.


I agree, the concept of monads is very simple, actually trivial. It's just a generalised form of function composition.

But thinking monadically and abstracting monadically is extremely different from what programmers normally learn, for a start because important monads like state and exceptions are built-in features of most programming languages. Seeing that these things have a common pattern, and seeing that it may be worthwhile to abstract this common pattern takes a lot of time.

The mismatch between the utter simplicity of the concept of monads, and the complicated explanations one comes across doesn't help.




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

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

Search: