W3C home > Mailing lists > Public > public-qt-comments@w3.org > November 2005

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

From: <bugzilla@wiggum.w3.org>
Date: Fri, 18 Nov 2005 21:51:26 +0000
To: public-qt-comments@w3.org
Message-Id: <E1EdE8k-0007Ac-W8@wiggum.w3.org>


------- 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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:26 UTC