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

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

    Date: Mon, 3 Sep 1984  00:26 EDT
    From: Scott E. Fahlman <Fahlman at CMU-CS-C>
    Once you've given the user a handle on the whole argument form with
    &whole, you shouldn't require him to add additional meaningless args
    just to confuse Defmacro into allowing subforms without complaining.
    That makes for confusing code.  If the user actually wants to make use
    of the additional args, that's different.

Huh?  I don't understand what you are trying to say.  Whats all this talk
about "confusing" defmacro?  Glenn's agrument is very simple:  Suppose the
user wants to get ahold of the original form, but also wants defmacro to
take it apart for him.  Why should the fact that he wants to include the
whole form in an error message (for example) cause him to lose error
checking on the syntax of the macro call?  If he wants to allow any length
form to be used, he can always add &REST IGNORE.  I don't see anything
meaningless or confusing about that, it says what it means quite clearly.

BTW, Glenn also just convinced me that macros that expand into
documentation strings are potentially hazardous, I think the idea of an
explicit DOCUMENTATION declaration is clearly the right thing for macros
that want to supply documentation strings.  The idea of using strings like
that was only a kludge to improve readability of the code anyway, macros
don't have to expand into readable code.