Am Di., 15. Juni 2021 um 21:31 Uhr schrieb Wolfgang Corcoran-Mathe < [email protected]>:
> On 2021-06-13 21:18 +0200, Marc Nieper-Wißkirchen wrote: > > > How does associating a type with a unique string guarantee its > > > disjointness in Scheme's type system? Unless a future standard > > > incorporates something about types with different UUIDs being > > > disjoint into its semantics, I don't see how this is any more > > > meaningful than the current advisory statements. It seems a > > > little like associating booleans with the Empire State Building > > > and vectors with the Chrysler Building; sure, those are unique > > > things, but what does it say about Scheme? > > > > > > > R6RS §11.1. Base types: "No object satisfies more than one of the > following > > predicates: ..." > > > > [snip] > > > > PS: As the R7RS base language is not rich enough, I have to cite R6RS > here, > > but the semantics can be applied mutatis mutandis to R7RS as well (as we > > are talking about opaque and sealed record types). > > Sorry, I would like to have Read The Fine Standard before > commenting. > > I'm still hesitant to adopt this for SRFI 224; as John mentions, > I wonder if it makes sense to require *all* implementations of SRFI > 224 to provid a fxmapping type with the same UID. > I think I haven't yet understood what the problem may be that John perceives here. First of all, an implementation does not have to implement fxmappings with R6RS records, not even with any kind of record. (That's why it is important that the spec talks about an opaque record type.) For implementations that do not build on R6RS records, the question of providing the UID does not even arise (because there is no on the actual implementation level). For R6RS implementations of fxmappings, the UID as specified in the SRFI could be used (which would be no problem because the UID would be well-known). In principle, a specific implementation could choose some other, arbitrary UID (unique in the sense that it does not clash with any other assigned UID, e.g. a UUID-4) or even a generative record definition, but I don't see any advantage in doing so, only the disadvantage that the Scheme system then wouldn't be able to warn you if you tried to load two different implementations of fxmappings into the same running Scheme system.
