[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issue: TAIL-RECURSION-OPTIMIZATION (Version 1)
- To: KMP@STONY-BROOK.SCRC.Symbolics.COM
 
- Subject: Issue: TAIL-RECURSION-OPTIMIZATION (Version 1)
 
- From: Eric Benson <eb@lucid.com>
 
- Date: Wed, 31 Aug 88 21:15:50 PDT
 
- Cc: CL-Cleanup@SAIL.Stanford.EDU
 
- In-reply-to: Kent M Pitman's message of Wed, 31 Aug 88 18:11 EDT <880831181117.6.KMP@GRYPHON.SCRC.Symbolics.COM>
 
This is not tail-recursion optimization.  This is more properly called
EARLY-FUNCTION-BINDING.  As it happens, early function binding is
often combined with tail-recursion optimization in the case of self
calls.  This has led to some confusion between the two, but in fact
they are orthogonal.  To clarify, tail-recursion optimization means
not consuming stack space for a function call when the result of that
call will be the result of the function making the call.  Early
function binding means committing to a particular function definition
for a name before the call itself, in Common Lisp usually referring to
a commitment to a particular definition when there is the possibility
of a redefinition which would invalidate that commitment.  Either or
both of these optimizations may be applied to both self calls and
calls to other functions.