Re: Disjoint types in SRFIs
Wolfgang Corcoran-Mathe 13 Jun 2021 18:58 UTC
On 2021-06-13 11:06 +0200, Marc Nieper-Wißkirchen wrote:
> Luckily, there is a solution, which can be implemented right now and which
> is future-proof, namely using uids, through which we can exactly express
> what we want.
>
> So the above sentence cited from SRFI 224 would become:
>
> "Fxmappings are instances of a sealed, opaque, nongenerative record type
> with uid
> fxmapping-2bf340e5-304e-436e-8478-926c7040f3f."
>
> Later SRFIs would use similar uids (prefixing a UUID-4 with the type name),
> earlier SRFIs will have to be revised anyway.
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?
--
Wolfgang Corcoran-Mathe <xxxxxx@sigwinch.xyz>
"[I]t is only a minor overstatement to say that [Brouwer] would have
thought twice about crossing a bridge if its engineers had used the
excluded middle to prove that it could bear his weight."
--Gilles Dowek