[R6RS] `eqv?' on immutable records

R. Kent Dybvig dyb at cs.indiana.edu
Mon May 14 16:18:42 EDT 2007


> For mutable records, specifying (identity #t) would be redundant, and 
> (identity #f) would (presumably) be disallowed.

If an implementation can determine that the mutable fields of a record are
actually never used or never mutated, can it eliminate the location tag
if (identity #t) has not been specified?

> Immutable record types would default to (identity #f), so their 
> instances would not be location-tagged.  Specifying (identity #t) would 
> cause instances to have a location tag.

To me, it's simpler (and purer) from the programmer's standpoint to assign
every object an identity and allow an implementation to eliminate it only
if the implementation can prove it's never needed.  Why burden the
programmer with the responsibility?

Kent



More information about the R6RS mailing list