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

Is &body REALLY like &rest?



Another in a long series of clarifications of clarifications is
requested.

In CLtL, page 145, it says
	``&body    This is identical in function to &rest...''

In Guy's clarifications, it says
	``145 Extend the syntax of an &body parameter to DEFMACRO to allow
writing
		&body (body-var [declarations-var [doc-var]])''
so as to make it easy to call PARSE-BODY.

In CLtL, page 146, it says
	``Anywhere in the lambda-list where a parameter name may appear and
where ordinary lambda-list syntax ...  does not otherwise allow a list,
a lambda-list may appear in place of the parameter name.''
This allows for destructuring.

Question:  Does the following DEFMACRO do destructuring or does it call
PARSE-BODY?

	(defmacro foo (&rest (a b c)) (bar a b c))

The real question is whether or not the clarification introduced a
difference in the meanings of &rest and &body.  One possible
interpretation is that a list after &rest does destructuring and a list
after &body implies a call to PARSE-BODY.

Which one is right?

	Pavel