“Mostly functional” programming does not work
queue.acm.org
queue.acm.org
On the other hand, when I build more complicated (web) systems, using a framework like Phoenix, everything is pure, except controllers or custom API clients, these are the single point of interacting with impure stuff and can be guarded easily, even dying is acceptable mostly.
The point I'm trying to make is: Monads and complex/strange type systems are completely unsuited for usage through the average joe programmer, no matter how much I agree with the topic itself. But there are solutions available that allow to reap most benefits of pure FP while also allowing to be pragmatic when appropriate. I mention Elixir here because it is the single best language that fits in this description I think.
The author simply states that when mixing imperative features like exceptions in a FP languages, sooner or later something is going to be broken, that wouldn't be in a pure FP language. The example given with the exceptions in a lazy value/variable is great for showing us that ! Who wouldn't forget that a Try/Catch block in a lazy val/var would be useless (because it would only throw the exception when evaluating the val/var) ?
And I agree, pure FP has a lot of benefits, the problem is that is too hard to create a real system in a pure FP approach. So we often make compromises to get things done. I use Scala everyday (and used to develop in Java) and I'm aware of that. Nevertheless, I can avoid a lot of problems comparing to Java imperative/OO approach.
I see this post more as a reminder that when using impure FP you still have to be careful about some tricky features