Re:How to read Haskell like Python
by joeyh on Monday November 14, 2011 @09:22PM
(#3236676)
The problem with the simplification is that you really need to understand which monad code is using to read the code.
foo >>= bar >>= baz has very different behaviors in the IO monad (it's like a shell pipe foo | bar | baz) and the Maybe monad (it's like a short-circuiting foo && bar && baz).
[ Parent
| on HN ]
Not really... you're perfectly capable of reading Python code:
x = foo()
y = bar(x)
baz(y)
Knowing that any of these functions could throw an exception. How is it any different, from the reader's perspective? (Yes, it's /very/ different from an implementation perspective, but that's not what we're dealing with here...)