by Apollidore · 6y ago · 0 comments
If you need to temporarily bypass purity there's unsafePerformIO and friends (or they can occasionally be used permanently if you do a lot of analysis I believe).
It's a pretty practical language compared to its reputation.
They are lamenting that implementing a trivial sorting function in Haskell is difficult.
As soon as you need to control the order of execution, memory usage, IO, or any combination of those, you are fighting the language and into territory of things you can technically do and out of the realm of things the language makes easy.
I'd say that it's one take on that paradigm, the Way of Monads is not the only way to do purely functional, Clean uses uniqueness typing instead. Though it otherwise has rather similar properties to Haskell.
Monad itself is never a silver bullet. Type systems and Composability are the true power of FP IMO.
This is no reason to avoid arguably the most popular (and state-of-the-art) function language and implementation out there.