@danielpitts said:Some compilers for specific languages will even optimize recursive functions to run as a loop on an imperitive processor. That's called "Tail recursion optimization", and as it says, it only works for tail-recursive functions (be it in functional or in imperative languages). If your function is not tail-recursive, the interpreter/compiler won't have any way to optimize it (into a simple loop) and you'll blow the stack. GCC is able to do tail recursion optimization BTW.