Previous: , Up: srfi err5rs records spec   [Index]


2.32.3.4 Record Identity

Two ERR5RS records with fields are eqv? if and only if they were created by the same (dynamic) call to some record constructor. Two ERR5RS records are eq? if and only if they are eqv?.

Two ERR5RS records for which the record? predicate returns true are equal? if and only if they are eqv?. This SRFI does not specify the semantics of equal? on opaque records, which are not required by this SRFI. (The R6RS requires equal? and eqv? to behave the same on all records, unless the records happen to be opaque records that represent pairs, vectors, strings, or bytevectors.)

Historical note: Pavel Curtis proposed that equal? behave the same as eqv?.

A define-record-type form macro–expands into code that calls make-rtd each time the expanded record–type definition is executed. Two ERR5RS record–type descriptors are eqv? if and only if they were created by the same (dynamic) call to make-rtd.