Re:Thinking About Recursion
by crimsonalucard on Thursday March 09, 2017 @01:41AM
(#13827515)
Here's a mind bending thought. It is actually the loop that is syntactic sugar and recursion is the implementation.
[ Parent
| on HN ]
You're begging the question of what the lambda calculus is. As a theoretical basis for computing it sits equivalently with Turing machines. In practical use, there are consequences with trying to represent the computation with one or the other model, and our physical hardware resembles neither, really.
Re:Thinking About Recursion
by vertex-four on Thursday March 09, 2017 @06:13AM
(#13828520)
In practice, lambda calculus machines are rare, and your code probably compiles down to machine code that more closely emulates a loop and a stack. I'm not saying they're not theoretically equivalent, of course.