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:12:45 +0000
To: public-qt-comments@w3.org
Message-Id: <E1EdDXJ-0005y9-Sk@wiggum.w3.org>


------- Additional Comments From steve.tolkin@fmr.com  2005-11-18 21:12 -------
OK, if it too late and unreasonable to change () = () why not change the 
definition of deep-equals.  (I recall that Mike Kay found this function to be 
problematic.)  What harm would be done by removing this sentence?
If the two sequences are both empty, the function returns true.

There cannot be a backwards compatibility issue.
I think that if this sentence is removed then deep-equal would return false.  
The general defintion states: "To be deep-equal, they must contain items that 
are pairwise deep-equal" but since neither sequence contains any items it ought 
to return false.  
More specifically it seems to be governed by this rule:
"If the two sequences are of the same length, the function returns true if and 
only if every item in the sequence $parameter1 is deep-equal to the item at the 
same position in the sequence $parameter2. "
Again, if that rule is applied it would return false.  

P.S. I do regard this as a bug.  This would be the one exception to the rule 
that deep-equals implies equals (=).
Received on Friday, 18 November 2005 21:13:20 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:09 UTC