[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tail recursion (was Re: a (revised) draft of R5RS)



   From: "John D. Ramsdell" <ramsdell@linus.mitre.org>
   Date: 27 May 1997 06:35:00 -0400
   Acording to the R5RS, an implementation is tail recursive if
   syntactically recursive procedures can be used to describe iterative
   computations that execute in constant space....

I cannot find anything in the draft of R5RS I have that defines "properly
tail recursive" in this way or, for that matter, in any other way.  Can
someone please tell me where R5RS says this?  (Section 1.1 mentions proper
tail recursion, but only to say that it is a requirement, and to point out
the consequences that follow from that requirement.)

It looks to me as if R5RS uses "properly tail recursive" assuming that the
reader allready knows what it means.  Perhaps the first occurrence of the
term should be footnoted with the papers in the bibliography that explain
tail recursion?

Something tells me that this won't make Ramsdell happy...  But I'll be
damned if I can figure out what's bothering him.  I guess someone needs to
explain to me in VERY SMALL WORDS exactly what the problem is here.  I just
don't see it.

(Matthias Blume sent a number of examples asking, for each one, if the call
to `f' should be tail recursive.  As far as I can see, the answer in each
case is "yes, of course".  I suppose an implementor can be forgiven for
missing any one of them, but I would expect him or her to fix the problem
once it was pointed out.)