3 ms·
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 be
by joeyh 15y ago
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).
- ezyang 15y agoNot 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...)