[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
&rest [discussion] replacement/addition
From: IN%"email@example.com.COM" "Paul Fuqua" 14-APR-1988 03:50
The general rule around here is, "Don't modify a list if you don't know
where it came from." Many constants in our implementation end up in
read-only areas, and there are other instances of sharing than APPLY/&REST,
so it's seen as a bad idea to use destructive operations on
random data objects.
Anyone who doesn't follow this rule is writing potentially buggy code.
One of the central points of the &rest discussion is the proposal to
stipulate, by definition, that &rest lists "come from" the function
which recieves them. The only ramification of this definition for
otherwise correct Common Lisp implementations is that APPLY/&rest lists
cannot be shared. So close, and yet so far. From your discussion
of the TI microcode, it sounds like the runtime penalty would be limited
to some extra stack allocation (NO real consing) except in cases
where the &rest list is actually saved. This is better than I had
expected was possible.
My measurements did not count functions with &key arguments. I believe
there are other possible ways to implement &key, so it would not
be fully fair to lump them with &rest. My measurement code was
included in my earlier message, and it can easily be modified to
measure &key (or &optional or &aux for that matter.)