4 ms·
> Doesn't work for what? It implies that FP doesn't work in the real world without IO or without a runtime. When the author talks about "the messy parts that i
by ratww 6y ago
> Doesn't work for what?
It implies that FP doesn't work in the real world without IO or without a runtime. When the author talks about "the messy parts that interact with the outside world" he's talking about the "Functional Core Imperative Shell" concept [1].
[1] https://www.destroyallsoftware.com/screencasts/catalog/functional-core-imperative-shell https://www.destroyallsoftware.com/screencasts/catalog/funct...
- hopia 6y agoSo then why doesn't "98% pure functional programming" work either as the author puts it?
- pinopinopino 6y agoOf course lambda calculus doesn't work in the real world, the canonical purely functional language. It doesn't work, because it are just functions and those need input before they become useful. A function just sitting on paper doesn't compute anything. However that is not entirely true, we can perhaps view analogue computers as purely functional computers, albeit one with continuous functions. But besides such a weird example, we should not kid ourselves, most imperative languages these days also need a runtime. And if you take that a step further, assembly also needs a runtime. But that is I think not a honest argument, but still something to think about. If we pursue this further down then we arrive at physical phenomena that do the computations. Are those imperative or functional? But now we are just playing around.