3 ms·
No system requires monad transformers or extensible effects. In some cases they become useful, particularly when dealing with unusual computational contexts; bu
by johnday 7y ago
No system requires monad transformers or extensible effects. In some cases they become useful, particularly when dealing with unusual computational contexts; but most of the time you can use IO, and sacrifice the sharpest edge of type-safety for an easier job of plumbing.
- UK-Al05 7y agoIn the real world, you end up with logging, ways of progating errors, etc All of which tend to introduce monads. When you have multiple moands on the go you need some combining them.
- johnday 7y agoYes, but as I was saying logging, errors and so on can all be handled directly inside of IO. Given that you can't do any of these things in a pure function anyway, the only loss of dropping into the wider context of IO is type safety.