Generative and nongenerative record types
Marc Nieper-Wißkirchen 30 Oct 2022 09:08 UTC
95% or more of the record-type definitions in practice are supposed to
be nongenerative. The R6RS syntax, however, makes generative
record-type definitions the default and needs an extra clause
(nongenerative) to override this default.
We can change the R6RS version of `define-record-type' in SRFI 237 so
that non-generativity becomes the default. For the few cases,
generative record types are needed, a clause (nongenerative #f) must
be added.
The SRFI 9 version of `define-record-type' would still create
generative record types. We can't change this in SRFI 237 unless we
want to abandon R7RS Small compatibility (slightly).
What do you think?