Am Di., 8. März 2022 um 09:37 Uhr schrieb Daphne Preston-Kendal
<
d...@nonceword.org>:
>
> On 8 Mar 2022, at 08:55, Marc Nieper-Wißkirchen <
marc....@gmail.com> wrote:
>
> > Depending
> > on what the direction for "R7RS Medium" is going to be, I may or I may
> > not be a good candidate for an editor. But that's the second step and
> > can be decided then. I would volunteer for coordinating drawing the
> > bigger picture as a first step.
> >
> > In any case, such a venture would be quite an amount of work.
>
> Assuming we can reuse R7RS small, R6RS, and SRFI spec language for a Medium spec, the difficulties are:
> (a) deciding what features go in (my list is intended as a list of candidates to define the boundaries of such deliberations, rather than as a wishlist/vote in favour of everything mentioned)
> (b) deciding which version of a feature/spec to prioritize, where multiple possibilities exist (though usually it’s a question of R6RS vs a SRFI, or R7RS vs R6RS; I don’t expect any three-way choices)
> (c) organizing and editing the text, largely copied from those specs, into a single coherent document
>
> There is also
> (d) designing and writing new specs for features which are not in any of them, or when work needs to be done to unify different approaches rather than choosing between them (as in R7 vs R6 define-record-type, define-library vs library (including phasing and, sigh, versioning))
> but, at least from my very preliminary draft agenda of features of consider, we already have specs for most of the things we would probably wish to put in.
Part of drawing the bigger picture is also whether we want "R7RS
Medium" to be home also for the R6RS camp.
A likewise fundamental question is how demanding "R7RS Medium" will be
for implementers. The stricter the standard, the more guarantees the
programmer has and the easier it is to write portable programs, but
then more work has to be done by implementers as the resulting
language will probably diverge from the respective native dialect.
[...]
> > - If the idea of "R7RS Medium" is to be more than just a platform for
> > the larger language but also a usable language in itself to be
> > published separately from R7RS-small and R7RS-large, we have to
> > approach the SC. The same is true when we want to have a better name;
> > this is, in particular, an important question if we want "R7RS Medium"
> > to serve as the successor of R6RS as well.
>
> Honestly, I don’t think anyone will support, or will have any reason to support, R7RS Medium without also supporting R7RS Large. R7RS Large will consist *almost* entirely of portable libraries on top of R7RS Medium — with ready-to-go sample implementations any implementation can just drop in. (The exceptions to portability are things that add additional system interfaces, like sockets or whatever. But I don’t see any reason for implementations not to adopt those too, in most cases.)
Some folk including implementers will support R7RS-large (when it is
no effort to do so as you write), but won't endorse it. But they may
endorse "R7RS Medium". I think we have an example for this with
respect to R7RS and the SRFI process. While Chez (or, rather, the
driving forces behind it) are not against supporting R7RS where easily
possible, they don't seem to endorse it in a way that would mean
making compromises in favor of it. Nor are SRFIs given any special
status from my reading of the issue tracker. So I think it can become
very important to deliver a standalone product; but it's important
that this standalone product will sit between existing (and future)
standards so that there won't be another split.
> This is why I considered Medium an intermediate artefact on the way to Large, and why I (still) feel that no WG2 charter revision is necessary.
>
> > - Related to both items above is the question of whether we want to
> > allow ourselves to drop strict (!) R7RS-small compatibility.
>
> My instinct is ‘no, R7RS small compatibility is a must’, though I realize that there are unfortunate edge cases: e.g. if we adopted continuation marks, this — strictly (!) — would mean keeping the redundant delay-force and the troublesome requirement on the dynamic environment of force calls. My reaction to that case, at least, is ‘oh well’ (or ‘well, we could introduce an alternative “force”, perhaps called “resolve” or something, which behaves properly in this regard’).
>
> I suspect we can come up with similar workarounds in other cases, but also that such cases will be very limited in number: R7RS small is a very flexible basis to work with, to WG1’s credit.
The number of cases is probably small. And won't affect real-world
programs greatly. Maintaining strict compatibility just to follow the
law would be a bad thing if the resulting language is worse than
without.
But there's actually one point where R7RS-small's semantics will have
to be modified non-trivially: R7RS-small allows redefinitions at the
top-level of programs. But that does not go well with the R6RS
expansion semantics that is needed to make, for example, identifier
macros work properly. (This is not specific to "R7RS Medium"; such a
change is already needed for the current R7RS-large.)
I haven't checked the whole R7RS-small document yet whether some other
hidden problem lurks there.
In any case, when the R7RS project was born, it was said that both the
small and the large language would be developed in parallel. In such a
model, strict compatibility would have been easy to achieve. Now for
reasons that are irrelevant here, we see the development of the large
language long after the small language was done. It's quite natural to
expect that some points of the already 9-year old R7RS-small may have
to be revised. Even a relatively conservative language like C++
deprecates and removes features on such a time scale. One could also
use this process to clean up R7RS-small where it is not well-defined
(e.g. the expression-level cond-expand).
> > One may want to postpone approaching the SC until the bigger picture
> > stands. I would also advise against trying to get all implementers on
> > board at this stage. We need the bigger picture first. If we wanted
> > maximal implementer's support, we would recreate R7RS-small under a
> > different name.
>
> Talking to implementers now can’t hurt, though. It’s good to hear that Guile is aware of this effort, and I already appreciate Per’s input greatly.
For sure! I just wanted to say that taking the intersection of all
native dialects would lead to R7RS-small, which achieves this maximal
compatibility already greatly.
Marc