3 ms·
Functional programming is where you end up if you ask the question, "how can I write better software more quickly with fewer bugs". I know of no shortcut to gro
by dustingetz 13y ago
Functional programming is where you end up if you ask the question, "how can I write better software more quickly with fewer bugs". I know of no shortcut to grokking why FP makes this possible other than just learning how to do it.
- AnimalMuppet 13y agoCribbing someone else's answer to my similar question (a couple months ago): Pure FP means no side effects. Side effects cause your state space to explode. (That is, no side effects means that the results of this function depend on its inputs only. Side effects means that the results of this function depend on its inputs, member variables of the object, file variables, global variables, the state of various things in the OS, user input read during the function, data read from the network, and maybe a few other things. It's much harder to understand such a function, get it working correctly, debug it, and prove that it correctly handles all corner cases.) The size of the program state space is your enemy, not your friend. Control it or die. FP dramatically helps you control it.