Re:How recursion got into programming: a comedy of errors
by skybrian on Wednesday July 23, 2014 @10:11AM
(#8074435)
It's typically handled by ignoring the issue and bumping up the maximum stack size if it becomes a problem. For example, I once wrote a Java indexer that simply failed on very long chains of function calls.
A better fix is to add a work queue or stack.