What is tail-recursion elimination?
Steve Yegge mentioned it in a blog post and I have no idea what it means, could someone fill me in? Is it the same thing as tail call optimization ? Tail call elimination is an optimization that saves stack space. It replaces a function call with a goto . Tail recursion elimination is the same thing, but with the added constraint that the function is calling itself. Basically, if the very last thing a function A does is return A(params...) then you can eliminate the allocation of a stack frame and instead set the appropriate registers and jump directly into the body of the function. Consider