[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Someone suggested that the low usage of &Rest could be explained because
programmers fear its inefficiency. This is unlikely. The code I
analyzed was Lisp Machine system code. Most of this code was written
as ZetaLisp code, in which &Rest lists are *more* efficient than they
are in Common Lisp. (Because of stack consing.) In fact, while &Rest
may be less efficient in Common Lisp it may be used more, perhaps
because it is better specified and thus more valuable from an algorithmic
About 10% of the Common Lisp functions used &Rest arguments. I believe
this is probably an upper bound. A great deal of effort has been spent
on this mailing list thinking of ways to generalize all of the primitives
in Common Lisp. Despite this effort to generalize the primitives, 90%
of the time there has been no good reason to use &Rest lists.
Furthermore, I believe there is an explanation for why people "have
the impression" that &rest/Apply must be highly optimized. Both of these
are used in somewhat unusual coding situations that require somewhat
more thought than normal. A tricky piece of code requires more attention
from the programmer. A common trap is to think the program spends as much
time executing code as the programmer spends writing it.
Without any data to support another position all of the proposals to
replace &Rest or augment it should be rejected, and its semantics should
be precisely defined as I have previously proposed.