3 ms·
FP is not "easier to reason about" (for humans; it is easier for machines). It's getting popular because it promises composability and reusability: the very thi
by klibertp 11y ago
FP is not "easier to reason about" (for humans; it is easier for machines). It's getting popular because it promises composability and reusability: the very thing OOP promised and failed to deliver. FP will fail, too - there's no silver bullet! - and then we'll move to something else.
- strmpnk 11y agoYet composability is exactly what makes it easier for humans to reason about. It's the small surface of a composable part that fits into more immediate representations in our mind. Whether or not it's natural mapping functions to and from concepts people might already operate with isn't the same problem. I'd argue that one can be offset with practice, though it's certainly not something that is easy for everyone. In that sense, FP might be a bit more immune to bad intuition, if only that you have to give up on mapping structure to insufficient analogs. The late object oriented point of view makes this step trivial for our minds and is thus a significantly complicated trade-off to quantify.
- TeMPOraL 11y agoFP is also getting popular because we hit the ceiling on Moore's law. Functional code is by default parallelizable (it takes effort to make it not so), which means it's a good selling point for the world in which we add more and more processors instead of increasing their speed.
- marcosdumay 11y agoYou know, in my one big project on Haskell I choose it for performance alone. I didn't even think I needed any other of its features at the beginning. Anyway, FP people are nailing composability and reusability to never seen level just in front of your eyes. You just have to keep them open to see. OOP did it at its time too, it just hit a ceiling; but there's one reason every imperative language is OOP nowadays.
- jimmaswell 11y ago>It's getting popular because it promises composability and reusability: the very thing OOP promised and failed to deliver. The unfounded anti-OOP statements on this site are so ridiculous. That is entirely untrue.