[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] libraries

(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.

John Cowan    http://ccil.org/~cowan    cowan@x
Mr. Henry James writes fiction as if it were a painful duty.  --Oscar Wilde

Scheme-reports mailing list