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

tail recursion

   Date: Fri, 20 Apr 90 17:08:05 edt
   From: "Marc Feeley" <feeley@chaos.cs.brandeis.edu>

   If we can't define the term precisely, why not just remove the
   `properly tail-recursive' requirement from Scheme and thus leave this
   issue to the common sense of the implementor (just like having
   negative numbers is up to the implementor!).

Tail-call optimization should have exactly the same status (present or
absent) in the language definition as garbage collection, which might
be called "cons optimization".  Tail-call optimization is really just
a special kind of garbage collection, with the same wide spectrum of
implementation choices -- stop and copy, compacting, incremental,
compile-time, etc.  E.g. if your target architecture really has no way
to express tail calls, then you might choose to just wait until a
stack overflow occurs and squeeze out useless stack frames at that