Subject: Re: [xsl] () eq () vs () = () From: Andrew Welch <andrew.j.welch@xxxxxxxxx> Date: Fri, 30 Sep 2011 13:44:42 +0100 |
On 30 September 2011 13:26, G. Ken Holman <gkholman@xxxxxxxxxxxxxxxxxxxx> wrote: > At 2011-09-30 12:28 +0100, Andrew Welch wrote: >> >> Regarding deep-equal(), the first bullet seems wrong: "If the two >> sequences are both empty, the function returns true." It's well >> defined, but doesn't seem to follow the rest of the spec where one >> side is (). I wonder if it could easily be as well defined as >> 'false'. > > But it is consistent with the requirement for the length of the two > sequences being the same (the second bullet says if the lengths are > different then return false()), and the third bullet doesn't come into play > because the lengths are zero. > > So, I think the length property makes a good case for them being equal and > returning true(). Hmm the length thing is just a quick way of determining if they aren't equal (without the cost of having to compare any values). If () = () is false, then it's intuitive (to me) that deep-equal((), ()) is also false. The one liner saying that it should be true just seems like it could easily say false. -- Andrew Welch http://andrewjwelch.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] () eq () vs () = (), G. Ken Holman | Thread | Re: [xsl] () eq () vs () = (), David Carlisle |
Re: [xsl] () eq () vs () = (), Michael Kay | Date | Re: [xsl] () eq () vs () = (), David Carlisle |
Month |