[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] "module" vs. "library"
Denis Washington scripsit:
> Why choose "module" as a name instead of "library"?
Well, the only *verifiable* answer is "Because more WG members voted
for that option, after proportional voting was resolved." Everything
else is either one person's point of view, or one person's guesses about
other people's motives for voting. But I can tell you the reasoning
that convinced me.
> I understand that the former might be a saner name semantically, but
> the fact that this (somewhat needlessly, IMO) breaks compatibility
> with the very similar "library" form of R6RS makes me kind of
> uneasy. To me, this feels more like bikeshedding than a sensible
> change, and seems to complicate the writing of code that runs on both
> R6RS and future R7RS implementations.
Although R6RS libraries and R7RS modules have many things in common,
they are in fact not compatible. If they used the same keyword, an
system of one type would not be able to readily reject libraries
appropriate for the other type. It would be possible with care to
construct libraries written in the intersection of the two systems, but
even then they would have different libraries available for import.
By keeping the systems syntactically separate, it is straightforward for
implementations that support both to do so without confusing them.
> On a related note, I have noticed that the modules/libraries are also
> named differently, with "scheme" as a prefix instead of "rnrs", which
> gives me the same uneasiness as the above. Why is that?
Pretty much for the same reason: using (rnrs foo (7)) would imply broad
compatibility with R6RS, and that does not exist. (The fact that R7RS
is not the successor of R6RS is one of my reasons for disliking the name
"R7RS"). Again, a hybrid system could permit, for example, an R7RS
module to import (r6rs hashtable (6)) with the expected effect, since
extensions are broadly permitted in R7RS.
> It would be nice if there would at least be a section which describes
> legacy "rnrs" modules which simply report the corresponding "scheme"
> counterparts (in WG2, probably).
They wouldn't be compatible enough. If you import an rnrs library, you
should get what R6RS says you will get, neither more nor less. However,
R7RS extensions over R5RS aren't necessarily given the same names as
their R6RS counterparts nor the same exact semantics. And, of course,
there are many R6RS features which don't exist in R7RS and may not even
exist in the WG2 version.
"But I am the real Strider, fortunately," John Cowan
he said, looking down at them with his face cowan@x
softened by a sudden smile. "I am Aragorn son http://www.ccil.org/~cowan
of Arathorn, and if by life or death I can
save you, I will." --LotR Book I Chapter 10
Scheme-reports mailing list