[Bug 2535] One empty sequence is deep-equal to another, but they are not =

http://www.w3.org/Bugs/Public/show_bug.cgi?id=2535





------- Additional Comments From steve.tolkin@fmr.com  2005-11-18 21:51 -------
I understand everything that Michael Kay said in his last post, and it is all 
true.  Howevere it is also true that under the current defintion of deep-equals 
comparing two empty sequences would be the one exception to the rule 
that deep-equals implies equals (=).

A simple fix to the definition of deep-equals would be to add "A = B", i.e.,
Two sequences A and B are deep-equal if A = B and count(A) = count(B) and every 
$n in (1 to count(A)) satisfies deep-equal(A[$n], B[$n]).

Of course implementations would know that the first clause only matters in the 
case of 2 empty sequences.

Received on Friday, 18 November 2005 21:51:35 UTC