4 ms·
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 li
by mbivert 2y ago
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.
- Gibbon1 2y agoPeople that see programming as math get really excited about recursion. Everyone else doesn't care, shouldn't care.
- timeinput 2y agoThere's this summation notation that these people who see programming as math and get excited about recursion forget about too.
- mbivert 2y agoI 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.
- burnished 2y agoHey, 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.
- zelphirkalt 2y agoRecursion is a form of iteration.
- mbivert 2y agoWorse: 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.