News for hackers. Stuff that matters.
Re:Will It Optimize? by barrkel on Friday September 16, 2011 @10:46AM (#3004613)
Irrespective of how it changes the semantics of (mostly functional) languages that rely on it for iteration, tail calling is also an optimization in languages that don't need to rely on it for this, and it is not wrong to describe it as such.
Re:Will It Optimize? by samth on Friday September 16, 2011 @12:47PM (#3005194)
There are two things here: an optimization, and a semantics guarantee. Obviously, if your language provides the guarantee, then implementing it correctly isn't just an optimization. But the original article claims that the transformation proves that proper tail calling is "just an optimization", which it doesn't prove at all. It's still an important semantic guarantee which increases the expressiveness of a language. This is true regardless of whether it is the only means of expressing iteration in a language.
Re:Will It Optimize? by ridiculous_fish on Friday September 16, 2011 @04:32PM (#3006190)
What the factorial example proves is that the set of recursive functions that can run in constant space is larger than just tail-recursive functions.

You're right to say that TCO guarantees increase the expressiveness of a language. If we could provide the same guarantees for an even larger class of recursive functions, it stands to reason our expressiveness would increase even further!