[scheme-reports-wg1] Equality of records John Cowan (01 Mar 2012 18:38 UTC)
Re: [Scheme-reports] Equality of records Ray Dillinger (01 Mar 2012 19:15 UTC)
Re: [Scheme-reports] Equality of records John Cowan (02 Mar 2012 16:51 UTC)
Re: [Scheme-reports] Equality of records Alaric Snell-Pym (02 Mar 2012 17:04 UTC)
Re: [scheme-reports-wg1] Equality of records Alex Shinn (02 Mar 2012 01:45 UTC)

[scheme-reports-wg1] Equality of records John Cowan 01 Mar 2012 18:38 UTC

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:

-The {\cf equal?} procedure recursively compares the contents of pairs, vectors,
-strings, bytevectors, and records,
-applying {\cf eqv?} on other objects such as numbers and symbols.
-If two objects are {\cf eqv?}, they must be {\cf equal?} as well.
+The {\cf equal?} procedure recursively compares the contents of pairs,
+vectors, strings, and bytevectors, applying {\cf eqv?} on booleans,
+symbols, numbers, characters, ports, procedures, and the empty list.
+If two objects are {\cf eqv?}, they must be {\cf equal?} as well.  In all
+other cases, implementations may return either \schtrue{} or \schfalse{}.

In addition, the phrase "other objects such as numbers and symbols"
(inherited from R5RS) is not clear.  Does it mean all other objects,
or only some of them?  I have spelled out the list of standard types
requiring `eqv?` behavior.

Comments?

--
In my last lifetime,                            John Cowan
I believed in reincarnation;                    http://www.ccil.org/~cowan
in this lifetime,                               cowan@ccil.org
I don't.  --Thiagi