GNU bug report logs -
#6591
24.0.50; incorrect doc for `catch'
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Fri, 9 Jul 2010 15:53:01 UTC
Severity: minor
Found in version 24.0.50
Done: Chong Yidong <cyd <at> stupidchicken.com>
Bug is archived. No further changes may be made.
Full log
Message #86 received at 6591 <at> debbugs.gnu.org (full text, mbox):
> > 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.
This bug report was last modified 14 years and 159 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.