Assignment versus binding

Gregory Ewing greg.ewing at canterbury.ac.nz
Thu Oct 6 04:46:51 EDT 2016


Paul Rubin wrote:
> It's useful to write some Python things in monadic style, but monads
> make the most sense as type operators, which don't map onto Python that
> well.  

There probably isn't much point in using the monadic style
in Python, since the main reason for it is to express
stateful processes in a functional framework, and Python
already has more direct ways of expressing stateful processes.

Also, if you translate monadic code directly from Haskell
to Python, you get something which is... not all that
pleasant to use. You'll see that when I've posted my
Python-based monads essay...

-- 
Greg



More information about the Python-list mailing list