W3C home > Mailing lists > Public > public-qt-comments@w3.org > May 2003

RE: node equality: fn:node-equal()

From: Michael Rys <mrys@microsoft.com>
Date: Wed, 14 May 2003 19:46:13 -0700
Message-ID: <5C39F806F9939046B4B1AFE652500A3A05467B51@RED-MSG-10.redmond.corp.microsoft.com>
To: "Tobias Reif" <tobiasreif@pinkjuice.com>
Cc: <public-qt-comments@w3.org>

And why can't you write the function yourself? 

I am not convinced yet that such a function has a general enough value. 

Also note that the more functions the WG is defining, the longer it will
take until implementations will have fully conformant implementations. 

I would much rather have an incremental development of the function
library and continue to add functions over time. This means that you
need to postpone functions that have less general value for a later

And your function below for me falls into the postponing category for
the following reasons:

1. I still don't fully understand the semantics
2. The semantics that I infer from your description (shallow-equal) is
in my opinion both cheap enough to write yourself and not general enough
a function to be included.

Best regards

> -----Original Message-----
> From: Tobias Reif [mailto:tobiasreif@pinkjuice.com]
> Sent: Wednesday, May 14, 2003 0:54 AM
> To: Michael Rys
> Cc: public-qt-comments@w3.org
> Subject: Re: node equality: fn:node-equal()
> Michael Rys wrote:
> > How do you define node equality?
> Just as fn:deep-equal() already does, without recursing down the tree,
> would think.
> > The whole reason for fn:deep-equal() is to
> > provide the most common from of node equality.
> But if I want to test two nodes for equality, and they have five
> thousand children, then using fn:deep-equal() would do 5001
> instead of one (where one comparison includes attributes etc).
> > Any other form in my
> > opinion should be written by the user him-/herself.
> As I said, I could do it by testing various aspects of the pair, thus
> writing my:node-equal(), but I'd prefer to have it available in the
> language.
> Comparing two nodes for equality is even more basic, general, and
> as is fn:deep-equal(). I could write a lot myself, but I also could
> design and implement the whole lang myself.
> > Having a
> > proliferation of equality functions in the spec seems not
> > (as David C. pointed out).
> I think something like a standard library could be a good idea (see
> David's posts): A small language with a sufficiently comprehensive
> library of utility functions (etc).
> Tobi
> --
> http://www.pinkjuice.com/
Received on Wednesday, 14 May 2003 22:46:20 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:12 UTC