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

Re: Hello and NodeIterator Revisited

From: Mike Champion <mcc@arbortext.com>
Date: Mon, 4 May 1998 10:00:37 -0400
Message-Id: <98May4.100046edt.26885@thicket.arbortext.com>
To: "Don Park" <donpark@quake.net>, <www-dom@w3.org>
At 09:17 AM 5/4/98 -0400, Don Park wrote:
>ECMAScript is a scripting language which differs greatly from general
>languages in terms of target audience and intended use.  If DOM is intended
>to be easy to use, I would like to see DOM API designed specifically
>designed for scripting languages so that the script writers will not have to
>know what an iterator is. 

This is why NodeIterator has the "collection" semantics allowing array-like
random access to iterators.  The intent is to allow ECMAScript implementers
to bind these methods to the "square bracket" syntax in ECMAScript.  In
other words, you're right that script writers won't tend to know what an
iterator is, but will use them implicitly whenever they reference a
"collection" of objects such as are allowed in the current Dynamic HTML

One problem, possibly fatal, that has come to light is that this would
generate a new iterator for every subscript reference.  It was discussed in
Melbourne (but I wasn't there), and the whole NodeIterator issue will be
revisited in the WG teleconference this Wednesday.  So, we're listening,
and we'll try to come up with improvements to the spec that meet the needs
you and others have expressed, and I'll DEFINITELY put more language in the
spec explaining why things are done the way they are, try to clarify common
misconceptions, how to work around known limitations, etc.

Received on Monday, 4 May 1998 10:02:51 UTC

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