unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: 42toes@gmail.com
To: 9973@debbugs.gnu.org
Subject: bug#9973: Inconsistent documentation of repeated arguments
Date: Sun, 06 Nov 2011 14:10:46 -0500	[thread overview]
Message-ID: <87obwpawy1.fsf@goof.bjgalaxy> (raw)

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





             reply	other threads:[~2011-11-06 19:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-06 19:10 42toes [this message]
2011-11-16 18:46 ` bug#9973: Inconsistent documentation of repeated arguments Andy Wingo
2013-03-10 20:20 ` Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87obwpawy1.fsf@goof.bjgalaxy \
    --to=42toes@gmail.com \
    --cc=9973@debbugs.gnu.org \
    --cc=b3timmons@speedymail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).