r/functionalprogramming • u/AlfonzoKaizerKok • Mar 05 '19
Python Is Python A Functional Programming Language?
https://arithmox.ai/pythonic-functional-programming-arithmox/
4
Upvotes
r/functionalprogramming • u/AlfonzoKaizerKok • Mar 05 '19
View all comments
Show parent comment
4
u/PointOneXDeveloper Mar 05 '19
Hmm, I think for has gotten popular because a lot of people are writing stuff for the web, and compute power is cheap relative to the cost of maintaining things. FP has some real benefits on how your code is organized, and the current flavor of FP lite is a good step in that direction. As long as you are not working with largish datasets (hint: if you are using python you shouldn’t be), and as long as recursion is truly easier to understand than the iterative solution, then who cares if you are using recursion. Some problems are just really gross with iteration.
But I agree that if you are doing general FP stuff on “Foldables” then you should implement fold with a loop and then compose from there.