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

&rest lists and other things ground through function application



With regards the current (or, by the time  this message makes it back,
probably two week old) debate on this topic,  I have yet to see the 
following point mentioned:

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.

This is a problem which defies mechanical solution, and should be
kept out of the language definition, except, as someone has already
pointed out, for a clear staking of position in the standard.


ceb