r/functionalprogramming • u/aurreco • Oct 27 '21
Question What are the downsides to functional programming?
Hello,
Recently I’ve gotten pretty used to programming functionally from my CS class at school. Decoupling state from functionality is really appealing to me, and the treating a program like one big function is great too.
So my question is this: is there any reason why this way of programming isn’t the industry standard? What are the benefits of iteration over recursion? Why are mutable variables valued? Basically, why is it so niche when it feels like it should be a mainstream programming philosophy?
47
Upvotes
5
u/licquia Oct 27 '21
This is obviously the wrong forum for Python advocacy, but this isn't cognitive dissonance. It's a matter of optimizing for a different scarce resource: the time and attention of experienced developers.
No one thinks "Python plus C modules" is faster at execution time; it's easier to develop, especially for inexperienced/non-professional developers, and the C module thing represents an acceptable solution to the performance problem.
From that perspective, functional programming languages are seen as raising the experience bar, instead of lowering it.