[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] [scheme-reports-wg1] Equality of records
On Fri, Mar 2, 2012 at 3:38 AM, John Cowan <cowan@x> wrote:
> Draft 6 requires that `equal?` recursively descend into records. However,
> the WG did not explicitly vote for this feature, nor is it mentioned
> in SRFI 9, which is our source document for records. In addition,
> R6RS explicitly forbids it, requiring that all objects except pairs,
> vectors, strings, and bytevectors be compared with `eqv?`. Therefore,
> I have applied the following diff:
We did not vote on the R6RS semantics either,
and what we did vote on - that cycles be detected -
is in fact very different from R6RS.
I can understand that with an equal? that diverges
one would be reluctant to descend into records,
which are far more likely that pairs or vectors to be
cyclic (e.g. any tree-like data structure with parent
pointers). But we don't have this worry, and Ray's
arguments are valid - it's counter-intuitive and
inconvenient not to handle records properly.
I'll add this to the current ballot.
Scheme-reports mailing list