Take the 2-minute tour ×  Function calls are handled via a stack
data structure. Is this enough for supporting recursion?
share|improve this question add comment  1 Answer  up vote 4
down vote accepted  Having the stack at all is the special
treatment the compiler has to have when supporting recursion.
In older programming languages like early versions of FORTRAN,
the runtime environment did not have a function stack and each
function had exactly one activation record reserved for it
somewhere in memory. That meant that recursion wasn't at all
possible, because if you recursively called a function you would
overwrite its one and only activation record, losing track of
the context of how you arrived there.  The introduction of the
function stack is what first enabled recursion to be actually
expressed in a programming language. Prior to that, programmers
would use recursion as a tool for abstractly solving a problem,
but would then have to translate that code into iterative logic
due to the lack of a call st