[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: () eq () vs () = ()

Subject: Re: () eq () vs () = ()
From: Andrew Welch <andrew.j.welch@xxxxxxxxx>
Date: Fri, 30 Sep 2011 13:44:42 +0100
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.