Why is Perl so afraid of “deep recursion”?
Because in Haskell, we have laziness & guarded recursion and tail call optimization and Perl has neither. This essentially means that every function call allocates a set amount of memory called “the stack” until the function returns. When you write recursive code, you build up a huge amount of memory because of these nested function … Read more