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

&REST lists



In reply to NGALL at G.BBN.COM ...

I believe that there is only one way in which the backbone of an &rest
list might end up being shared, and that is if the list was passed in as
the last arg to APPLY.  In all other cases, the &rest list is built up
from distinct arguments, and couldn't possibly be anything that the user
has his hands on.  We had a lengthy debate at one time about the APPLY
case: should we guarantee the user that the &rest list is a fresh copy,
guarantee that the APPLY list is incorporated into the &rest list, or
not guarantee anything.  I believe that we never reached a firm decision
on this, which means that the "not guarantee anything" case wins by
default.  So smashing a &rest arg list is not a good idea unless you
know where it came from and who else might have hold of it.  As Steele
pointed out, smashing anything is not a good idea unless you know its
pedigree.  If you want to be safe, copy it before smashing.

-- Scott