This is the *very* belated announcement that the Red Edition of R7RS-large is officially complete. This does not mean that R7RS-large as a whole is complete, far from it. However, there are now a large number of SRFIs incorporated into the R7RS-large standard. Development of SRFIs will continue for the Orange Edition, with a ballot in due course. Other editions will follow the order of the spectrum until the final or Ultra-Violet edition is reached.
I'm inclined to believe the RedEdition web page is authoritative
I'd still like to hear an authoritative answer to the question of whether (scheme list)
should export car and cadr.
That was my intention. My earlier email was just a trial balloon.On Wed, Jun 28, 2017 at 6:14 PM, Will Clinger <cesu...@gmail.com> wrote:I'm inclined to believe the RedEdition web page is authoritativeI'd still like to hear an authoritative answer to the question of whether (scheme list)
should export car and cadr.So would I. Since no one has raised the point before, I will flip-flop and go with exporting the overlapping names (understanding that they have the same binding in both libraries rather than merely the same behavior), unless there is an objection on this list within a reasonable time. If there is a further objection, we'll hold a ballot.
--John Cowan http://vrici.lojban.org/~cowan co...@ccil.orgThe whole of Gaul is quartered into three halves.--Julius Caesar
--
You received this message because you are subscribed to the Google Groups "scheme-reports-wg2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scheme-reports-wg2+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
There is, however, a conflict between (scheme comparator) and (scheme hash-table)
because the latter exports deprecated versions of string-hash and string-ci-hash that
accept an optional second argument.
The R7RS Red Edition added one new conflict between an R7RS library and an R6RS
library: the remove procedure of (scheme list) takes a predicate as its first argument,
but the remove procedure of (rnrs lists) takes an object to be removed; the R6RS
equivalent of R7RS remove is named remp.
There is, however, a conflict between (scheme comparator) and (scheme hash-table)
because the latter exports deprecated versions of string-hash and string-ci-hash that
accept an optional second argument.I don't see this as actually a conflict. Nothing prevents (scheme comparator) from exporting versions of the procedures that accept an optional argument. It's an error to call them with a second argument, but such errors do not have to be detected at compile time or run time, though they can be.
The R7RS Red Edition added one new conflict between an R7RS library and an R6RS
library: the remove procedure of (scheme list) takes a predicate as its first argument,
but the remove procedure of (rnrs lists) takes an object to be removed; the R6RS
equivalent of R7RS remove is named remp.
I assume you'll be renaming the R6RS version to r6rs:remove in -r7r6 mode?
I'd still like to hear an authoritative answer to the question of whether (scheme list)
should export car and cadr.So would I. Since no one has raised the point before, I will flip-flop and go with exporting the overlapping names (understanding that they have the same binding in both libraries rather than merely the same behavior), unless there is an objection on this list within a reasonable time. If there is a further objection, we'll hold a ballot.I think there should be no difference between importing (scheme list) and (srfi 1), which must export car and cadr. The bindings for R7RS libraries should be required to be the same.
I'd still like to hear an authoritative answer to the question of whether (scheme list)
should export car and cadr.So would I. Since no one has raised the point before, I will flip-flop and go with exporting the overlapping names (understanding that they have the same binding in both libraries rather than merely the same behavior), unless there is an objection on this list within a reasonable time. If there is a further objection, we'll hold a ballot.I think there should be no difference between importing (scheme list) and (srfi 1), which must export car and cadr. The bindings for R7RS libraries should be required to be the same.
I fully agree with this. However, R7RS-small is too much underspecified to make this work well in a portable manner: When I take the reference implementation of (srfi 1), which imports (scheme base) and re-exports the binding to, say, car, and a program imports (srfi 1) and (scheme base), it is not guaranteed that the bindings of car as exported by (srfi 1) and (scheme base), respectively, refer to the same locations because R7RS-small seems to make no guarantee that (scheme base) is loaded only once. The binding of car as exported by (srfi 1) may stem from a different loading than the binding as exported by the (scheme base) directly imported from the program.
There's no problem for the small language here, since importing different bindings under the same name "is an error". Thus a hypothetical implementation allowing multiple instances of the same library at runtime would be required to resolve this error sensibly, choosing one of the bindings.
Yes, what you say is exactly correct. Moreover, if R7RS-large were to include a requirement to the effect that importing (scheme base), (scheme list) and (srfi 1) could be done without any conflicts, this would effectively require R7RS-large implementations to be sensible without saying anything about the underlying multiple library instance ambiguity.
On Tue, Jul 4, 2017 at 5:32 PM, Marc Nieper-Wißkirchen <marc....@gmail.com> wrote:
There's no problem for the small language here, since importing different bindings under the same name "is an error". Thus a hypothetical implementation allowing multiple instances of the same library at runtime would be required to resolve this error sensibly, choosing one of the bindings.
Is it so? The way I read the report, it is responsibility of the user not to import the same identifier with different bindings.The wording "it is an error" is not used in the sense of "must" (as an RFC keyword), which describes responsibilities of the implementation; e.g. we would rather say ’+’ must return the sum of its arguments than say that it is an error for ‘+’ not to return the sum of its argument.
The following example is an error (for which the user is responsible):
;; Library definitions
(define-library (foo) (export x) (import (scheme base)) (begin (define x 1)))
(define-library (bar) (export x) (import (scheme base)) (begin (define x 2)))
;; Program
(import (foo)) (import (bar)) ...
In analogy, the following is not guaranteed not to be an error:
;; Library definitions
(define-library (srfi 1) (export car ...) (import (scheme base)) (begin ...))
;; Program
(import (scheme base)) (import (srfi 1)) ...
However, for any sensible implementation of R7RS-small, it should not be an error.
--
Marc
--
You received this message because you are subscribed to the Google Groups "scheme-reports-wg2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scheme-reports-...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "scheme-reports-wg2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scheme-reports-...@googlegroups.com.
True. OTOH, if the string-hash and string-ci-hash exported by (scheme comparator) were the same as the deprecated versions exported by (scheme hash-table), they too would be deprecated. I prefer to confine the deprecation to identifiers exported by a single library.
So, any requirement we add to the module system of R7RS-small should also be able cover this case. (Without, even implementations in the form of user-provided libraries of such simple concepts as the boxes of SRFI 111 are not possible in a portable way.)
On Tue, Jul 4, 2017 at 7:04 PM, Marc Nieper-Wißkirchen <marc....@gmail.com> wrote:So, any requirement we add to the module system of R7RS-small should also be able cover this case.
We're discussing new requirements to the R7RS-large language.
This would allow forplugging in a 3rd-party definition of (srfi 1) without breaking yourexisting programs.
If you want to propose changes for the large language, by all means do so.It's an ongoing process, and we want all the help we can get.
Marc is already massively contributing. Please don't alienate him.
It is deliberately underspecified in many respects,in the spirit of the R5RS and in the hopes of being an all-encompassingand long-lasting specification. Scheme has been around for over 40years, and has a sort of timelessness about it by which I expect it to bearound another 60. I have R7RS library wrappers around 30-year-oldScheme code which don't even require any modification - just the externallibrary declaration file. Given that, I can write my own code now confidentthat it will run unmodified on any future Scheme implementation thatsupports R7RS-small, an extremely easy target, at least to the extentthat makes sense given the implementation's limitations and experimentalfeatures.
If you want to propose changes for the large language, by all means do so.It's an ongoing process, and we want all the help we can get. You seem todisagree with the concept and charter of the small language, which is fine -that's why the large language exists.
There's no problem for the small language here, since importing different bindings under the same name "is an error". Thus a hypothetical implementation allowing multiple instances of the same library at runtime would be required to resolve this error sensibly, choosing one of the bindings.
A minor change that would be helpful, for example, would be the suggestion Alex made earlier:There's no problem for the small language here, since importing different bindings under the same name "is an error". Thus a hypothetical implementation allowing multiple instances of the same library at runtime would be required to resolve this error sensibly, choosing one of the bindings.If we knew that R7RS-small implementations resolved this "error", what the sample implementation of SRFI 113 (sets and bags), for example, could do would be to import and re-export "comparator?", specifying the comparator-type, from SRFI 128. A program importing SRFI 128 (comparators) and SRFI 113 will then import the identifier "comparator?" twice. As Alex proposes, an implementation will have to chose the bindings of one of hypothetically multiple loads of SRFI 128.This would solve the problem: The location of comparator? as imported from SRFI 128 and SRFI 113 will then have to come from one loading of SRFI 128, say Load1. So the library body of SRFI 113 will see the same comparator? as the main program. But R7RS-small specifies that loading multiple identifiers from the same library have to come from one loading, SRFI 113 will import all identifiers of SRFI 128 from the same Load1, as does the top-level program.
I also realize why jumping to errata in the small language seems appealing, sincewe haven't provided anywhere to collect such changes in the large language (shortor writing a SRFI). We should do so.
Alex Shinn <alex...@gmail.com> schrieb am Do., 6. Juli 2017 um 15:41 Uhr:I also realize why jumping to errata in the small language seems appealing, sincewe haven't provided anywhere to collect such changes in the large language (shortor writing a SRFI). We should do so.Would it be possible to revivify the bug tracker/the ticket system used by WG 1?
Using this, we could probably sort any upcoming issues in one of the following categories:0) Already in R7RS-small, not really an issue.1) Really an erratum for R7RS-small.2) For R7RS-large.3) Should be in a next revision of the R7RS-small, i.e. R8RS.4) Should be in the next iteration of IEEE-Scheme (should it be based on R7RS-small + Errata + Uncontroversial things).5) Won't receive support by the majority of important implementations.
--Marc
--
You received this message because you are subscribed to the Google Groups "scheme-reports-wg2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scheme-reports-wg2+unsub...@googlegroups.com.
True. OTOH, if the string-hash and string-ci-hash exported by (scheme comparator) were the same as the deprecated versions exported by (scheme hash-table), they too would be deprecated. I prefer to confine the deprecation to identifiers exported by a single library.This puzzled me, so I didn't reply to it until now. It seems that you understand deprecation to be a property of a *procedure*, whereas I understand it to be a property of an *export*. Thus a single binding could be deprecated in one library and not deprecated in the other. Unfortunately, there is at present no portable way to mark an exported identifier as deprecated.
If there were, however, then when importing a binding from more than one library, it should provoke a deprecation warning only if it was deprecated in all of the libraries.
That is obvious because
their specifications in SRFI 128 say they accept exactly one argument,
For example, it is an error for a procedure to be passed an argument of a type that the procedure is not explicitly specified to handle, even though such domain errors are seldom mentioned in this report. Implementations may signal an error, extend a procedure’s domain of definition to include such arguments, or fail catastrophically.
SRFI 125 says quite explicitly that those two
identifiers/procedures/whatever are "incompatible with the procedure
of the same name exported by SRFI 128 and SRFI 126.