On 1/20/2014 10:29 AM, spir wrote:
I think tail call is very common
Yes, they are. That is why space-optimizing all tail calls, and destroying proper tracebacks for all tail calls, is gross over-kill. Saving space is only needed when recursion would make the stack space used grow without any particular bound. (Note that this is only an issue for practical implementations, not pure mathematics.)
The point of the 'tail call' proposal is to have the programmer explicitly say when space conservation is needed, instead of asking the interpreter to magically make that determination.