IO monad: which, why and how
In many discussions about FP - especially about purely functional programming - there are talks about IO monad, IO type and so on. Its users argue that it is better than your standard imperative approach, that it helps reason, encapsulate side-effects and design more elegant programs. On the other hand, its opponents argue that programs are side-effectful by nature, so you would end up with something that needs IO for like 80% of the codebase while learning curve for newcomers would go up, so what’s the benefit? Let’s try to figure out.
kubuszok.com