Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


It'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.


The 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.


Sounds more like an unfamiliar peg than an inappropriate one, IMO.


Yes, that may well be the case.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: