Tail-call recursion

Do you have an example of any language or compiler that performs the optimization you want? That would be more constructive.

(Or do you just want memoization? This is of course easy with a macro, but is not the sort of thing a compiler should do without the programmer explicitly requesting it.)

It’s not just a question of terminology. It’s a question of real vs. imaginary.

You have to understand that it’s pretty frustrating for us to get repeated threads where people are like “Julia doesn’t have TCO, it needs TCO to have fast recursion, why does it suck compared to functional languages, why don’t you want recursion to be fast”, and then it turns out inevitably that they have no idea what TCO is or why it is/isn’t useful, and the optimized recursion they are imagining is instead some entirely different and possibly fictional concept.

4 Likes