Subject: RE: bug#6591: 24.0.50; incorrect doc for `catch'

From: "Drew Adams" <[email-masked]>
Date: Sun, 11 Jul 2010 12:10:38 -0700

> > No better alternative?  Did you read the thread?  What 
> > about doing what the rest of the world does: (catch TAG FORM...)?
> 
> Just because you spell the body form does not make it any different
> form.  The ellipses is already unambigous.

Please read the thread.  Ellipsis commonly means that whatever it follows can be
repeated.  The body is not repeated.

[Ditto for `*' (same as `...').
Common Lisp writes this as (catch TAG {FORM}*), which is clear.]

This convention for `...', no matter how common, should also be stated in the
docs, of course.  I gave the Oracle docs as an example, and this convention is
clearly spelled out there.

> > What does "BODY forms" refer to: (1) a set of BODYs, each 
> > of which is a Lisp form, or (2) the set of Lisp forms that
> > comprise a BODY.  The term "BODY forms" is ambiguous.  It
> > can mean the forms that make up BODY or a list of forms each
> > of which is a BODY.
> 
> This is _not_ a list,

What is not a list - what is "this"?

> it is a repeated argument,

Bzzzzt!  No, sorry, but thanks for playing.  What argument is repeated?  BODY?
Eli says no.  What is repeated (repeatable) is the FORM that actually is an
argument (and which does not appear in the syntax description).  `BODY...' is
not an argument (according to Eli).  BODY is not an argument (according to Eli).
BODY cannot be repeated (according to Eli). [Where "according to Eli" means my
understanding of what he wrote.]

> not matter how you name the parameter.

What parameter?  BODY is not an (ordinary) parameter.
`BODY...' is not a parameter.

BODY would be a &rest parameter, if we expressed it that way (which I suggested
as one possibility).  Other than that, it is _not_ an ordinary parameter.

[MacLisp writes (*catch TAGSPEC . BODY), which is clear, even if not
conventional outside the Lisp world.]

But in (catch TAG BODY...) BODY is not a placeholder, and `...' does not mean
repetition of BODY.  Instead, `BODY...' is a single token standing for a list of
forms that is spliced in to produce an implicit `progn'.

So "it is a repeated argument, no matter how you name the parameter" is wrong on
at least two counts.

> If it were a list it would be a single parameter.

See above.