[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] libraries
Having different keywords harms scheme users who want to write portable
libraries. Today, a scheme user who wants to write portable libraries
has to make a choice: use R6RS library or R7RS define-library. Change to
the same keyword, and the scheme user has a way to write portable
libraries that work on as many scheme systems as possible now and into
the future, including current R6RS systems and future R7RS systems.
The second sentence of the Charter for working group 1 is "The purpose
of this work is to facilitate sharing of Scheme code." I believe this is
a way to increase the sharing of Scheme code.
The base library problem is solvable. For instance, R7RS has the library
(scheme r5rs). Since R6RS is based on R5RS, it should be easy to provide
the same library on those systems.
On 5/19/2013 10:06 PM, John Cowan wrote:
> (Copied to ticket #536)
> Michael Montague writes:
>> Right now, it is not possible to have a library which works in both
>> R6RS and R7RS. If the define-library keyword was changed to library
>> then some libraries would work in both R6RS and R7RS.
> In the general case, no library can work exactly unchanged on both R6RS
> and R7RS systems because of the differences in the names and contents
> of the libraries they need to import. At the very least, each needs to
> import the base library, which means that an R7RS library will begin
> with `(import (rnrs base))` and an R7RS library with `(import (scheme
> base))`. This difference is unavoidable, of course, since these libraries
> are quite distinct.
>> Using a distinct keyword makes portability of libraries between R6RS
>> and R7RS impossible. I believe that normal error detection on R6RS
>> systems should detect R7RS libraries (outside the common subset) as
>> an error. And vice versa for R7RS systems. It seems like it would be
>> reasonably easy for a system to decide that the error is likely caused
>> by an incompatible library. And for systems that want to support both
>> R6RS and R7RS, it seems like attempting to load the library first as
>> R7RS and if that doesn't work then as R6RS would do the trick.
> Quite so, but this is equally true if the libraries are (as they are
> today) syntactically distinct.
> In short, having this difference helps humans and simple-minded
> classifiers and doesn't actually harm anyone that I can see. If you
> see further than I do, please help me here.
Scheme-reports mailing list