[R6RS] non-opaque record equality
William D Clinger
will at ccs.neu.edu
Sat Feb 25 16:43:29 EST 2006
Kent wrote:
> (equal? (f) (f)) nonterminating if procedures are records,
> #f otherwise
If procedures were records, wouldn't they be *opaque*
records? In which case the recursive comparison would
be eqv?, and the equality comparison would terminate.
Another way of saying it is that representing procedures
as non-opaque records would be illegal if equal? compares
all such records recursively, because the R5RS requires
equal? to use eqv? when comparing procedures.
I'm not a big fan of defining equal? to compare records
recursively, and I'm on record as opposing this in the
past, but having it do so on *non-opaque* records but
not on *opaque* records seems like a reasonable and
intuitive compromise.
Another possibility is that we could require equal? to
terminate on all arguments. Judging by a discussion in
comp.lang.scheme, it appears this is easier and more
efficient than I had believed when we last had this
discussion.
Will
More information about the R6RS
mailing list