proper tail calls

Peter Michaux petermichaux at
Mon Jan 21 09:08:44 PST 2008

On Jan 20, 2008 8:01 PM, Brendan Eich <brendan at> wrote:
> On Jan 20, 2008, at 5:22 PM, Erik Arvidsson wrote:
> > My concern with E (or A for that matter) is that it requires
> > additional syntax.  I'd prefer if we could keep the syntax small.  I
> > don't think implicit PTC is an issue.  It is an optimization that the
> > interpreter/compiler should do.  What are the problems with I?  It
> > does not change the semantics of the language.
> Proper tails calls are not an optimization; they certainly do change
> semantics, insofar as you can't write certain programs without them
> being guaranteed.

I've been trying to find out how they are not an optimization. I
haven't read anyone else that thinks they are not an optimization but
I have read other people refer to them as an optimization. I think
that from an application programmers point of view they are an
optimization since the same program will run without proper tail calls
if the computer has infinite resources.

> I'll defer to Dave's 2005 LtU comment (he may have
> newer ones he prefers),

He only mentions that transforming non tail-call application code into
tail-call application code is "a standard optimization technique" in a
language that has proper tail calls. He doesn't mention whether or not
proper tail calls in the language are to be considered a optimization.

> which has useful links.

Following one of those links leads to a wiki and the wiki has the
following page which discusses proper tail calls as an optimization in
the language


More information about the Es4-discuss mailing list