3 ms·
One question for the author: monads are not just a tool for IO but form a coherent abstraction over all side-effects. In my Haskell code, I personally have used
by bradrn 5y ago
One question for the author: monads are not just a tool for IO but form a coherent abstraction over all side-effects. In my Haskell code, I personally have used monads for applications including parsing, fallible operations, IO, random number generation and testing, amongst others. For me, the most useful feature of monads is that they act as a coherent abstraction, allowing me to write code which can work over any of these domains. How does the author propose to replace this?
- bade 5y agoOther uses of monads are fine, I just think you can do better and simpler for IO.
- bradrn 5y agoSure, but to me the best things about monads are precisely those ‘other uses’. And if that means you still need monads, then why not use them for IO as well? That then gives you the advantage of unifying everything under the same abstraction.