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

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



    Date: Mon, 3 Sep 1984  19:46 EDT
    From: Scott E. Fahlman <Fahlman at CMU-CS-C.ARPA>
    What, exactly, would become impossible if we turned off too-many-argument
    checking when an &whole is encountered?  Looks to me like Common Lisp
    would still be more or less Turing equivalent.  To me, the question is
    whether it is more of a pain for me to write "&REST IGNORE) (DECLARE
    (IGNORE IGNORE))" twice a year or for you to write

    (WHEN (> (LENGTH WHOLE-ARG) 7)
          (ERROR "Too many args to FOO."))

This is not an acceptable substitute for having defmacro perform the error
checking automatically.  It requires the user to count the number of
arguments by hand; if he inserts a new argument, he has to remember to go
and increment a number imbedded in his code.  More importantly it assumes
that the user can duplicate the way defmacro signals the error, which in
general he cannot.