2 ms·
I definitely do disagree because if you distill it down to making a single recursive call or pushing a value on a stack with local scope, I would say pushing a
by CyberDildonics 1y ago
I definitely do disagree because if you distill it down to making a single recursive call or pushing a value on a stack with local scope, I would say pushing a value on the stack in simpler every time.
If there are multiple recursive calls you could use multiple stacks instead.
All of the debugging is going to be more difficult if you have to move through multiple call stacks to get at the previous values, where you could just see the entire stack values in a debugger or print out the stacks.
For number 3, I think that doesn't apply, since tail-recursion is really a funky way of looping and not a funky way of using the call stack for a stack.