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