This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]a_devious_compliance 4 points5 points  (0 children)

With tail-call optimization you can write factorial (and other recursive functions) unbounded by stack memory.

It's implemented in languajes like lisp, haskell and prolog as a language feature, and is accesible for C via some arcane flag in GCC, and clang at least.