3 ms·
Indeed; to debug either a loop or a recursive function (and whether the latter is using tail-call recursion optimization or not) you often need to see the data.
by mannykannot 6y ago
Indeed; to debug either a loop or a recursive function (and whether the latter is using tail-call recursion optimization or not) you often need to see the data. Given a stack trace showing only calls without arguments, about the only extra datum you get with non-optimized recursion is how deep it went.
In terms of debugging, tail-call elimination is no worse than the optimizations typically applied to loops.