

Fortress - wglb
http://www.tbray.org/ongoing/When/200x/2009/12/03/Fortress

======
jeremyw
See Steele's comments.

~~~
jf
The article is worth reading for Guy's comments alone.

~~~
blasdel
It's not like Tim Bray had anything to add beyond "I don't get it" -- He's
still stuck thinking this is all about fetishizing recursion.

If only it was popularly called "Stack Frame Elimination", maybe people would
get it.

Guido's post calling it "Tail-Recursion Elimination" was particularly
regressive -- the transformation doesn't make your code any less recursive!
All it does is jump to the beginning of an existing stack frame, instead of
setting up a new one, copying your state into it, and jumping to that.

~~~
JulianMorrison
When is eliminating a stack frame a sensible optimization? Only when you
intend to go hundreds of calls deep. And there are only two types of code that
do that: heavily factored "threaded" code in the Forth style, and recursion.

~~~
blasdel
As I commented on Bray's post, Enterprisey Java, loaded up with as many
spaghetti abstractions as can be interposed, has lots of stack frames to
spare. Aren't each of the extra dispatches and dependency interjections going
to have tail calls to the next such abstraction?

~~~
JulianMorrison
...so don't do that, said the doctor.

------
silverlake
Someday Bray will understand what TCO really is. But he's been such an
outspoken opponent that it would be embarrassing to publicly admit he was
wrong. I think he'll probably say, TCO can be useful for some programming
styles, but most programmers don't notice it's absence so let's just move on
to more important topics. I'm looking forward to watching him whitewash his
earlier position.

