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

Proposal #6 Status: Parsing in &BODY



Nobody seems to oppose this.  One or two people have questioned its
usefulness, but the discussion we had on this a year or so ago
demonstrated considerable demand for this as an alternative to making
users handle environment objects directly.

Most people who commented on this prefer KMP's proposed syntax, though
there seems to be little enthusiasm for the inclusion of default and
supplied-p values.  (Speaking for myself, I'm happy to go along with
this if we don't get into default/supplied-p complexities.)  So, we have
a revised proposal:
---------------------------------------------------------------------------
Proposal #6A: Parsing in &BODY

Extension:

Extend the syntax of an &BODY parameter to DEFMACRO to allow writing
(DEFMACRO name (... &BODY body-var [declarations-var [doc-string-var]]) ...)

If DECLARATIONS-VAR is present, it means to give the original body to
PARSE-BODY (with documentation-allowed-p true iff the doc-string-var is
present) and then bind the variables to the corresponding values
returned by PARSE-BODY.  This is purely a syntactic convenience for the
user of DEFMACRO so that he doesn't have to use &ENVIRONMENT and then
call PARSE-BODY himself.

Note: This extension is proposed only for &BODY, not for &REST, so &BODY
will no longer be exactly equivalent to &REST in a DEFMACRO arglist.