Maybe Monads Might Not Matter
gbracha.blogspot.com
gbracha.blogspot.com
But monads are good for dozens of other things, including Bayesian inference[1], computation with optional values, list comprehensions, software transactional memory, quantum mechanics[2] and (to geek out a bit) anything that involves defining a lambda-calculus analog over a topos. Any time your problem domain includes a bunch of hairy matrix math, there may be a lovely, intuitive formulation using monads.
Now, if you're never programmed in Haskell, or if you've stuck to the IO monad, you may not understand why monads are a powerful way to tackle certain kinds of problems. But if you've never used monads in anger, how do you whether or not they're a useful tool?
If you want a relatively programmer-friendly language that supports monads, check out Scala's 'for' loop. It looks like a list comprehension, but it gives you about 90% of what you want from monads in practice.
[1] Here's an article I wrote on probabilistic programming with monads: http://www.randomhacks.net/articles/2007/02/22/bayes-rule-an...
[2] Here's a much cooler article on quantum mechanics with monads: http://blog.sigfpe.com/2007/03/monads-vector-spaces-and-quan...
But really, the difference between 'do' notation and a syntax based on list comprehensions is not that big.
Compare:
[(x, y) | x <- [1 .. 10], y <- [1 .. 10]]
vs
do { x <- [1 .. 10]; y <- [1 .. 10]; return (x,y) }
The main difference is that it uses return (which is implicit in the comprehension syntax), and the final element in the do syntax is pushed into the first position in comprehension syntax.
(Another alternative would be liftA2 (,) [1 .. 10] [1 .. 10].)
First believing that async calls to actors with side effects helps reasoning.
Second he conflates Haskells exposure of monads with the math of monads. Haskell just makes more explicit (and provable) what other systems indirectly model (often times muddling the ability to reason over it).
Every time I have to break up a chain of method calls in Java with several lines of ternary null checks, I think about the Maybe monad.
Also, if one of those 2% have to write code understood by the other 48%, they probably shouldn't use a ton of anonymous functions (or generics, whatever they are).
It's ridiculous to complicate your code in an attempt to hit some moving target of "an ignorant person might be able to understand this." If a "bread-and-butter" programmer is using a modern language and doesn't understand functions, the correct response by everyone involved is for that programmer to spend some time understanding functions. I dare say the same is true for monads, although in many languages monads are hard to abstract out, and thus have less of an everyday value.
(Also, you mean "the other 98%".)
>2% have to write code understood by the other 48%
that would be the other 98% ;)
Note you did not say "already know", but "can actually figure out". I don't want to know what kind of software is being written by someone who, if they tried, could not actually figure out how to pass a lambda.
I might say people in the FP world are much more in touch with the future of programming then most. Languages like Haskell are solving problems (elegantly) that many mainstream programmers have not yet come across but they will.