4 ms·
I wouldn’t say he tried to destroy functional programming. If you read his response he pretty clearly says that he just thinks that FP as a solution to all prob
by amw-zero 6y ago
I wouldn’t say he tried to destroy functional programming. If you read his response he pretty clearly says that he just thinks that FP as a solution to all problems is “overselling” the solution.
And I 100% agree. Thinking that functional programming solves all problems is a fundamental misunderstanding of computation.
The first thing that opened my eyes to the overselling of FP as a panacea was reading Leslie Lamport’s work, specifically Computation and State Machines: https://lamport.azurewebsites.net/pubs/state-machine.pdf https://lamport.azurewebsites.net/pubs/state-machine.pdf. Specifically, in Section 3: Programs as State Machines, he demonstrates how the same algorithm for computing factorials can be implemented via mutation or recursion.
With TLA+, Lamport also showed that mutation and state can be reasoned about mathematically, contrary to the central claim of functional programming purists.
The point is simple: functional programming doesn’t in any way _inherently_ help with correctly implementing programs. The fact that FP is currently in vogue is simply another example of how humans don’t require any evidence of anything at all before following a belief system blindly.
FP does prevent certain classes of mistakes from happening, i.e. unintentional bugs due to mutation creating implicit state machines. But preventing bugs and aiding in correctness aren’t exactly the same thing.