[R6RS] revised draft of record srfi
dyb at cs.indiana.edu
dyb
Tue Aug 2 14:11:46 EDT 2005
> It wouldn't bother me a bit to require a different type to be
> generated at each execution, but I suspect that Kent Dybvig
> can give us some very good reasons, quite possibly having to
> do with separate compilation, for wanting the freedom to do
> some of this at macro expansion time. I'm okay with that.
The good reason is just the same as for allowing quoted data, certain
closures, empty strings, and empty vectors to be allocated just once:
they're all immutable, as are type descriptors, and there's little
justification for forcing a new one to be allocated each time a piece
of code is executed, e.g., in a loop.
Now, if we can *count* on the type being the same for each execution,
there are some interesting things we can do, and if we can count on the
type being created as far back as when a file is compiled, there are even
more interesting things we can do, including avoid full nongenerativity
in many cases where it would otherwise be needed. But we're not talking
about going this far, we're just talking about *allowing* the type to
be the same (or different).
(Note that we don't go as far for nongenerative types as we do for quoted
data; we allow distinct instances of the latter to be commonized, but
not the former.)
Kent
More information about the R6RS
mailing list