News for hackers. Stuff that matters.
Re:Thinking About Recursion by khedoros1 on Wednesday March 08, 2017 @08:39PM (#13826011)
You've described the reason that I doubt I'll ever do much with functional programming. Using it to solve a non-trivial problem reminds me unpleasantly of math, rather than lists of instructions.
Re:Thinking About Recursion by dreamcompiler on Thursday March 09, 2017 @12:47AM (#13827279)
This is what I like about FP. As in math, you're expressing ideas about relationships that must always hold true, regardless of time. You think less about how state changes over time and more about what the fundamental "truths" of your program have to be. For me -- and for many problems but certainly not all -- this is an easier way to think.
Re:Thinking About Recursion by dualogy on Thursday March 09, 2017 @05:53AM (#13828453)
yeah "regardless of time and space", as one observes in the resulting time and space usage. By the time the purely functional program has been tweaked for better (time and space) performance, said readability has greatly suffered ;D and I say that as an enthusiastic FPer