Re:Misconceptions about loops in C
by mbivert on Thursday June 27, 2024 @03:20PM
(#40814044)
Iteration is more natural for most people than recursion. There are a few aliens for whom recursion is more natural, but iteration matches more closely daily life.
[ Parent
| on HN ]
People that see programming as math get really excited about recursion.
Everyone else doesn't care, shouldn't care.
There's this summation notation that these people who see programming as math and get excited about recursion forget about too.
I think recursion is just another tool in the toolbox: sometimes, some solutions are easier to think of recursively, and so it makes sense to use it, at least for the first prototype.
But yeah, using it systematically (in a non-functional language) is unwise.
Hey, other kinds of needs can do and should care. Recursion is a very interesting perspective to apply to a problem and gratifying in its own right.
Re:Misconceptions about loops in C
by zelphirkalt on Friday June 28, 2024 @12:03PM
(#40822007)
Recursion is a form of iteration.
Worse: both are theoretically equivalent.
But this doesn't change the fact that humans seem to intuitively perceive iteration as more natural.
Like, "space" and "time" can't be understood as two distinct notions, per relativity. But we still perceive them as such on a daily basis.