Re: R7RS scope & yearly editions & language interop Marc Nieper-Wißkirchen 11 Sep 2020 15:28 UTC

Am Fr., 11. Sept. 2020 um 17:20 Uhr schrieb Lassi Kortela <xxxxxx@lassi.io>:

[...]

> > Now, this program cannot work because we have to versions of the
> > record type coming from the two disjoint loadings of the library
> > (fantastic bar).
>
> Good point. The core data types and control flow of Scheme would have to
> be protected from changes in yearly editions. `define-record-type`
> should define compatible types, `cons` should make compatible pairs
> (Racket broke this by separating immutable conses from mutable ones),
> strings should be compatible, etc.

The problem with define-record-type is that records type are
generative. R6RS has ways to create unique types, but R7RS dropped the
R6RS model. But even when the problem with record types is solved (but
what do you do if a later version adds new fields to a record?), there
are similar problems remaining, e.g. global variables (or parameters)
that won't be shared when a library is loaded (in two versions) twice.