Python from Wise Guy's Viewpoint

prunesquallor at comcast.net prunesquallor at comcast.net
Sat Oct 25 17:10:40 EDT 2003


gt5163b at prism.gatech.edu (Brian McNamara!) writes:

> prunesquallor at comcast.net once said:
>>The other problem is that monads don't compose.
>
> I disagree.  See the discussion of "monad transformers" in part 3 of
>
>    http://www.nomaware.com/monads/html/index.html
>
> I have even implemented a few of the monad transformers in C++.
> Composing monads is terrific!

The problem is when you combine several monads in a stack.  You have
to decide on an order, even if the monads are orthogonal.  Then you
have to create lifting code to get at the monad you want.  If you
re-order the stack, you have to re-order the lifting code, too.

I think monads are pretty cool, but they still have their problems.





More information about the Python-list mailing list