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

(defmacro foo (&whole w) ...)



In the current Spice Lisp implementation, &whole sets the same switch
that &rest does.  This leaves too-few-arguments checking in place, but
disables too-many-arguments checking.  So if there is an &whole anywhere
in the arglist, you have to supply at least enough subforms to satisfy
the required arguments (if any), but you are free to supply extras which
the user can access by picking apart the &whole argument by hand.  This
seems intuitively right to me; it would be confusing to require &whole
and &rest in the same arglist or to special-case the situation where
&whole appears alone.

This would give the same results as proposed by Moon, but 

(defmacro foo (&whole w a) ...)

would require AT LEAST one subform, not EXACTLY one subform.

-- Scott