Re: Defmacro Signature
- From: Ken Tilton <kentilton@xxxxxxxxx>
- Date: Wed, 31 Jan 2007 16:36:02 -0500
Michael Bohn wrote:
I found this macro-lambda-list in a lisp source file written by Edi Weitz.
(defmacro insert-char-class-tester ((char-class chr-expr) &body body)
^^^^^^^^^^^^^^^^^^^^^
I can't see how this definition conforms to the hyperspec:
http://www.lispworks.com/documentation/HyperSpec/Body/03_dd.htm
reqvars::= var*
Not sure about how to read grammars, but he is using "destructuring by lambda lists":
http://www.lispworks.com/documentation/HyperSpec/Body/03_dda.htm
Is this form often used in macro-definitions??
Absolutely, and it is one of coolest things about macro writing that one can easily offer the kind of structure you find in defclass in your own macros. This is part of how "code as data" pays off, and one of the things that would make macro-writing in other languages quite hard.
kt
--
Well, I've wrestled with reality for 35 years, Doctor, and
I'm happy to state I finally won out over it.
-- Elwood P. Dowd
In this world, you must be oh so smart or oh so pleasant.
-- Elwood's Mom
.
- References:
- Defmacro Signature
- From: Michael Bohn
- Defmacro Signature
- Prev by Date: Re: Defmacro Signature
- Next by Date: Re: All Your GUIs Are Belong to Us (Die, McCLIM! Die!!)
- Previous by thread: Re: Defmacro Signature
- Next by thread: Celtk vs Cello
- Index(es):