Hacker News new | ask | show | jobs
by nemoniac 1482 days ago
Tail call elimination!!!

I had no idea that this was in LISP 1.5. If you had asked me, I would have sworn it was Steele, 1977. Wikipedia supports that[1], albeit one might not consider it the most reliable source.

So apparently (partial) TCE has been around since at least 1961. In that light, it's baffling that it's not supported more universally.

[1] https://en.wikipedia.org/wiki/Tail_call

3 comments

The OP describes the support in HLC for TCO as limited (only for self-recursion, if I get it right, possibly more limited than that). Steele may still have been first to describe general TCO.
Tail call optimization in scheme are automatic. This LISP 1.5 compiler simply recognizes certain patterns and rewrites them. Not quite the same thing but I was surprised as well when I first looked into the code.
You could edit Wikipedia, citing Hart and Levin's memo introducing the compiler.