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

Re: Tail Recursion in Common Lisp ???



    ...does...Common Lisp require...tail recursion optimization ?

  No.  It has even been suggested that the current definition does not 
  allow tail-recursion optimization -- that's an issue we have to settle
  soon, and I hope that we'll be able to work out a solution in which this
  is allowed.

  -- Scott

I recall a number of messages claiming that the current definition of
Common Lisp makes tail recursion optimization difficult, and I recall
that Kent Pitman pointed out that in (DEFUN FOO () (FOO)) the current
value of FOO must be fetched before the tail-recursive call is performed
(though this should have nothing to do with tail recursion optimization).

I don't recall any suggestion that the current definition of Common Lisp
does not allow tail-recursion optimization.  How could a language
definition possibly disallow it?

-- Will Clinger