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:30:07 +0000
To: public-qt-comments@w3.org
Cc:
Message-Id: <E1EdDo7-0006SB-Jn@wiggum.w3.org>

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





------- Additional Comments From mike@saxonica.com  2005-11-18 21:30 -------
The general rule for deep-equal() is that two sequences A and B are deep-equal
if count(A) = count(B) and every $n in (1 to count(A)) satisfies
deep-equal(A[$n], B[$n]).

A consequence of this is that deep-equal((), ()) is true. This is because in
mathematical logic (every x in X satisfies C) is always true when X is empty.

deep-equal() and = adopt fundamentally different ways of comparing two
sequences, both of which are useful. It should not be suprising that they give
different results for the empty sequence, since they also give different results
for most other sequences.

Michael Kay
personal response
Received on Friday, 18 November 2005 21:30:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:42 GMT