[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
&rest arguments
For Inference commercial products written in Common Lisp where stack
consing of &rest is not supported, we do not use &rest arguments. The
overriding consideration is to avoid generating the cons garbage of
the &rest argument. We NEVER maintain pointers to conses in &rest
arguments outside the extent of the function call that caused the &rest
argument to be set up. We do use &rest arguments where stack consing
of the &rest argument is available; in fact, this is fast becoming a
de facto lisp language requirement for our code -- we've pointed this
out to numerous Lisp vendors.
So, I advocate adding a declaration to Common Lisp much like the
DYNAMIC-EXTENT declaration already available in Lucid Lisp. Functionality
like this is, I believe, mandatory for a Lisp to be viable as the basis
for a commercial software product.
As for APPLY and &rest arg copying or sharing, we'd never use such a
construct in our code anyway, so I don't care. I believe that not
guaranteeing the sharing is the best approach, if you want an opinion.
In general, APPLY is just too slow. We've avoided it for mini-object
systems used internally for this reason (that is, to call methods from
a generic function).
--Joe