[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: () eq () vs () = ()
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|