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

&REST lists

    Is there general agreement on whether it is valid Common Lisp to
    destructively modify (RPLACA, RPLACD) the list to which a &REST
    parameter is bound?  I can't find a reference in CLtL for this.

I think there's general agreement that &rest args are supposed to be
righteous lists with indefinite extent, so RPLAC'ing them ought to be

However, this was one part of the Common Lisp spec that several early
implementations deliberately chose to deviate from in the interest of
greater efficiency.  (Symbolics and TI were able to gain considerable
efficiency by consing rest args on the stack.)  Both companies had plans
to fix this eventually, stack-consing only when the compiler could prove
it was safe to do so, but I don't know if this has finally been
accomplished and distributed to all users.

-- Scott