What is difference between tail calls and tail recursion?
lisp, scheme, tail-call, tail-call-optimization
Solution
Let's disambiguate "tail calls" first.
A call in tail position is a function call whose result is immediately returned as the value of the enclosing function. Tail position is a static property.
A call in tail position can be implemented without pushing anything onto the stack, because the old stack frame is essentially useless (under assumptions that are generally true in functional languages but not necessarily in C, etc). As Guy Steele put it, a tail call is a jump that passes arguments.
Roughly, a language implementation is properly tail recursive if it has the same asymptotic space usage as one that implements all calls in tail position as jumps without stack growth. That's a really rough simplification. If you want the full story, see Clinger's Proper Tail Recursion and Space Efficiency.
Note that just handling tail-recursive functions specially is not enough to achieve proper tail recursion (any tail call must be specially handled). The terminology is somewhat misleading.
Also note that there are other ways to achieve that asymptotic space efficiency without implementing tail calls as jumps. For example, you might implement them as normal calls and then periodically compact the stack by removing useless frames (somehow). See Baker's Cheney on the MTA.
Problem
I understand that tail recursion, is a special case where a function makes tail calls to itself. But I do not understand how tail calls and tail recursion are different. In “properly tail recursive” language with implemented TCO (Tail Call Optimization), like Scheme, it means that tail calls and tail recursion do not consume stack or other resources. In a language where compiler can not optimize tail recursion, program can run out of stack and crash. In “properly tail recursive” languages, implementing tail recursion for looping is no less efficient, than using a loop, I presume.