unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#9973: Inconsistent documentation of repeated arguments
@ 2011-11-06 19:10 42toes
  2011-11-16 18:46 ` Andy Wingo
  2013-03-10 20:20 ` Andy Wingo
  0 siblings, 2 replies; 3+ messages in thread
From: 42toes @ 2011-11-06 19:10 UTC (permalink / raw)
  To: 9973

Before making some changes to the docs, I just wanted to give a heads
up.  Recall the motivation behind Scheme

    "It was designed to have an exceptionally clear and simple semantics and
    few different ways to form expressions."

Why not tighten up notation in the docs as well as in the language?  My
hunch is that in the long run doing so will help those learning Guile.

Examples from the current Guile Reference:

(1) -- Scheme Procedure: string-append . args
(2) -- Scheme Procedure: append lst1 ... lstN
(3) -- Scheme Procedure: error msg args ...
(4) -- Scheme Procedure: error who message irritant1 ...

IMO, (4) is the right thing.  In software documentation '...' means
'repeated zero or more times', so 'arg ...' always includes 'args' as a
possibility, rendering 'args ...' redundant and potentially confusing.
Of course, in principle, we might intend 'args' to mean an aggregate
data structure such as list, but in that case 'arglist', 'list',
etc. would be clearer IMO.  Thus, I would fix (1-3) to be

(1) -- Scheme Procedure: string-append arg ...
(2) -- Scheme Procedure: append lst ... obj
(3) -- Scheme Procedure: error msg arg ...

(The 'obj' from (2) is particular to 'append'.)  FWIW, highly regarded
docs such as the RnRS reports, _The Scheme Programming Language_ by
Dybvig, CLtL2, etc. are consistent on such things.

Something like 'elem1 ... elemN' might be useful in a discussion of say
the Ith element and so on, but it not easy enough just to use 'elem ...'
in the definition header and then elaborate in the definition body w/
'elem1 ... elemN', etc.?

Thanks,
Bake





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#9973: Inconsistent documentation of repeated arguments
  2011-11-06 19:10 bug#9973: Inconsistent documentation of repeated arguments 42toes
@ 2011-11-16 18:46 ` Andy Wingo
  2013-03-10 20:20 ` Andy Wingo
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Wingo @ 2011-11-16 18:46 UTC (permalink / raw)
  To: b3timmons; +Cc: 9973

On Sun 06 Nov 2011 20:10, 42toes@gmail.com writes:

> Before making some changes to the docs, I just wanted to give a heads
> up.  Recall the motivation behind Scheme
>
>     "It was designed to have an exceptionally clear and simple semantics and
>     few different ways to form expressions."
>
> Why not tighten up notation in the docs as well as in the language?  My
> hunch is that in the long run doing so will help those learning Guile.

Sounds great to me.  Care to submit a patch? :)

Andy
-- 
http://wingolog.org/





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#9973: Inconsistent documentation of repeated arguments
  2011-11-06 19:10 bug#9973: Inconsistent documentation of repeated arguments 42toes
  2011-11-16 18:46 ` Andy Wingo
@ 2013-03-10 20:20 ` Andy Wingo
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Wingo @ 2013-03-10 20:20 UTC (permalink / raw)
  To: b3timmons; +Cc: 9973-close

On Sun 06 Nov 2011 20:10, 42toes@gmail.com writes:

> Why not tighten up notation in the docs as well as in the language?

> (4) -- Scheme Procedure: error who message irritant1 ...
>
> IMO, (4) is the right thing.

I just checked and I think we are OK (only simple-format has ". args",
and that only to be consistent with the following C prototype) -- thanks
to your patches, also.  Please submit a new patch if you find more
instances of foo . bar in prototypes.

Cheers :)

Andy
-- 
http://wingolog.org/





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-10 20:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-06 19:10 bug#9973: Inconsistent documentation of repeated arguments 42toes
2011-11-16 18:46 ` Andy Wingo
2013-03-10 20:20 ` Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).