unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: "Marc Nieper-Wißkirchen" <marc.nieper@gmail.com>
To: guile-devel@gnu.org
Cc: Mark H Weaver <mhw@netris.org>, John Cowan <cowan@ccil.org>
Subject: Re: [PATCH] add SRFI: srfi-121; generators
Date: Mon, 3 Aug 2020 21:41:15 +0200	[thread overview]
Message-ID: <CAEYrNrTv48FajG2HPwCPBsBTwg5p36Y1CEwhZbm3CbA5Vp5PYQ@mail.gmail.com> (raw)
In-Reply-To: <mailman.61.1596470427.10776.guile-devel@gnu.org>

Am Mo., 3. Aug. 2020 um 18:00 Uhr schrieb <guile-devel-request@gnu.org>:

> Message: 1
> Date: Sun, 02 Aug 2020 18:39:32 -0400
> From: Mark H Weaver <mhw@netris.org>
> To: John Cowan <cowan@ccil.org>
> Cc: guile-devel@gnu.org
> Subject: Re: [PATCH] add SRFI: srfi-121; generators
> Message-ID: <87v9i0zn7k.fsf@netris.org>
> Content-Type: text/plain

> It didn't occur to me that the reference implementation of a finalized
> SRFI would include comments like "the spec would have me return #f, but
> I think it must simply be wrong".  However, I see now that I was
> mistaken.  Indeed, those buggy implementations and confused comments are
> in both the SRFI-121 and SRFI-158 reference implementations.

To be fair, one should remark that the reference (or, rather, sample)
implementations do not belong to the SRFIs proper. That said, it is
surprising why the questions raised in the sample implementation
haven't been resolved during the draft period of the SRFI.

> I'm sorry to say it, but in my opinion SRFI-121 and SRFI-158 should be
> deprecated and avoided.  The reference implementations do not match the
> specifications, and the specifications themselves are self-contradictory
> (see above).  Therefore, it's entirely possible that users of these
> SRFIs may have contradictory expectations about how these procedures
> behave.  Some may have read the spec one way, some may have read the
> spec in a contradictory way, some may have learned from how the buggy
> reference implementation behaves, and others may have learned from the
> behavior of a different SRFI-121 implementation that doesn't have those
> bugs.  At this point, I don't see how the problems can be fixed without
> breaking some users' assumptions, and therefore breaking existing code.

There are a number of SRFIs with post-finalization notes, most of
which alter some behavior of their respective SRFIs. At the moment,
there is no general programmatic way to know whether a specific
implementation is up-to-date with respect to these post-finalization
notes or not.

A similar problem occurs with libraries that have already been voted
into R7RS-large. In the Red Edition, (scheme generator) stood for the
interface of SRFI 121; in the Tangerine Edition, it stands for SRFI
158. Of course, one can circumvent any problems by importing the
libraries through their SRFI names and not using the scheme namespace
before R7RS-large has been finalized.

> I sincerely hope that these two SRFIs are an aberration, and not
> representative of the quality of the R7RS-large effort.

While I have been contributing to R7RS-large, I have to agree with you
to some extent. Most of the SRFIs that have been voted into R7RS-large
or are to be submitted for it don't have the quality of the R6RS or
R7RS(-small) specifications. This is especially true in the following
areas:

- Questions of tail context are often ignored.
- Higher-order procedures are often silent with respect to call/cc,
exceptions or side effects.
- Formal syntax is often missing.
- Formal semantics are almost always missing.

In particular, the ignorance of call/cc in most SRFIs dealing with
higher-order procedures make this defining feature of Scheme hard to
use in a portable way.

SRFI 121/158 is incidentally also an example for this. Take 'gappend'
from SRFI 158, for example. It doesn't specify when the various
generator arguments are being called.

Of course, all this can be fixed, but by the sheer size of R7RS-large,
I doubt that it ever will.

Marc

PS: One of my own issues with SRFI 158 is that accumulators are not
that well-designed from a logical point of view. I summarized it here:
https://srfi-email.schemers.org/srfi-158/msg/6219505/. A follow-up
thread begins here:
https://srfi-email.schemers.org/srfi-158/msg/6557831/.



       reply	other threads:[~2020-08-03 19:41 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.61.1596470427.10776.guile-devel@gnu.org>
2020-08-03 19:41 ` Marc Nieper-Wißkirchen [this message]
2020-08-04 12:48   ` [PATCH] add SRFI: srfi-121; generators Marc Nieper-Wißkirchen
2020-08-04 15:24   ` John Cowan
2020-08-04 15:58     ` Marc Nieper-Wißkirchen
2020-08-04 17:24       ` Dr. Arne Babenhauserheide
2021-01-21 18:39 John Cowan
2021-01-23  0:58 ` Mark H Weaver
2021-01-23  2:14   ` Shiro Kawai
2021-01-23  2:18     ` Arthur A. Gleckler
2021-01-23  6:37       ` Mark H Weaver
2021-01-26  3:29         ` John Cowan
2021-01-26  6:48           ` Linus Björnstam
2021-01-26  6:49             ` Linus Björnstam
2021-01-26  7:14             ` Marc Nieper-Wißkirchen
2021-01-26 11:54               ` Linus Björnstam
2021-04-08 15:53                 ` Arthur A. Gleckler
2021-04-11  6:52                   ` Linus Björnstam
2021-04-11 16:17                     ` Arthur A. Gleckler
  -- strict thread matches above, loose matches on Subject: below --
2020-08-01  3:42 John Cowan
2020-08-02 22:39 ` Mark H Weaver
2019-07-01  0:09 nly
2019-07-01  5:06 ` Mark H Weaver
2019-07-01  6:00   ` Mark H Weaver
2019-07-01  6:21     ` Amar Singh

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=CAEYrNrTv48FajG2HPwCPBsBTwg5p36Y1CEwhZbm3CbA5Vp5PYQ@mail.gmail.com \
    --to=marc.nieper@gmail.com \
    --cc=cowan@ccil.org \
    --cc=guile-devel@gnu.org \
    --cc=mhw@netris.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).