4 ms·
They do but it's a bit of a square peg round hole. It's just easier not to use things like the IO monad.
by xupybd 3y ago
They do but it's a bit of a square peg round hole. It's just easier not to use things like the IO monad.
- WorldMaker 3y agoIt's also fun to note that the IO monad in some perspectives is an abstraction for "functional core, imperative shell" moving as much of the imperative "order matters" computations to an outer "shell". The IO monad in some ways is the way of mathematically representing the "shell" of an application.
- sparkie 3y agoThe problem with monads is that they're a poor abstraction. Need to output: WriterMonad. Need input: ReaderMonad. Need to store something: StateMonad. Local mutation: MonadST. IO/global mutation: MonadIO. Transactions: MonadSTM. And to combine them: a stack of monad transformers. How delightful! This is why there's now more focus on algebraic effects as an alternative for keeping a functional core, imperative shell. Monads/transformers are just an ugly solution that even hardcore functional programmers don't want to use.
- epgui 3y agoSounds more like an unfamiliar peg than an inappropriate one, IMO.
- xupybd 3y agoYes, that may well be the case.