[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
&rest lists and other things ground through function application
From: mcvax!pilatus!ceb@uunet.uu.net
Date: Sun, 13 Mar 88 13:22:44 +0100
If you want to be able to freely modify the structures which are
used to implement these features, something imbedded in the kernel of
the language is going to have to *copy* them.
You could do a top-level copy, but then you are still not protected if
someone does a (setf (cadr passed-argument-structure 'truc). In order
to beat this, you have to do an arbitrary depth copy, and then, when
you pass tangled, circular, non-ending horrible things which make
print go bananas (I do this often), you have to do circular list
detection, etc. . . . and you very quickly get into a game which can't
be won.
While this is true, it is not really significant. In the case of the
substructure, this is no different from ordinary arguments - the Nth
parameter seen by a function is always EQL to the Nth argument passed
to the function. &REST lists, however, have the additional potential
for being EQ with the list passed as the last argument to APPLY, and
this is what needs to be specified more carefully.
barmar