W3C home > Mailing lists > Public > www-dom@w3.org > April to June 1998

Re: [www-dom] deprecate tree traversal? (Was: <none>)

From: David Brownell <David.Brownell@Eng.Sun.COM>
Date: Mon, 1 Jun 1998 11:24:04 -0700
Message-Id: <199806011824.LAA25527@argon.eng.sun.com>
To: claude@utlco.com, www-dom@w3.org
> From: Claude Zervas <claude@utlco.com>
> IMHO the following methods can be summarily deprecated:
> 	Node.getFirstChild()
> 	Node.getPreviousSibling()
> 	Node.getNextSibling()

You seem to be saying this can be done because the iterators
could be used to perform similar tree traversals, but that would
call for more memory allocation and moreover ...

> Also, I saw some previous posts requesting that reference
> counting be somehow tacked on to the DOM. I vote no on that.

That was more a reflection that the current iterator (Tree and Node)
APIs have some serious problems which are most naturally fixed by
something like a NodeIterator.release() method.  I don't think anyone
really liked that fix.

This isn't to say that iterators are bad at all; but I sure can't
recommend the flavor in the April DOM draft.  Personally, I'd prefer
to treat iterators as convenience functions on top of the standard
tree traversal API; that's the classic approach, it has virtues.

- Dave
Received on Monday, 1 June 1998 14:23:49 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:04 UTC