W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2012

Re: [DOM4] Question about collections versus maps

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 10 Apr 2012 17:19:09 -0400
Message-ID: <4F84A3CD.5010805@mit.edu>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: public-webapps@w3.org
On 4/10/12 5:05 PM, Tab Atkins Jr. wrote:
> Agreed, but ES6 is making this easier with Object.keys() and for-of iteration.

Sort of.  for-of doesn't necessarily work on this stuff, as I understand.

> (Off the top of my head, I can't come up with a use-case for
> enumerating all flows in a page anyway, beyond editing environments or
> the like.)

That's a much stronger reason to go with a map, assuming the editing 
environment use cases are not a concern.

Again, my point was that _if_ there are enumeration use cases then one 
needs to worry about this stuff.  If there are no such use cases, then 
clearly it doesn't matter whether the API supports enumeration well.

Received on Tuesday, 10 April 2012 21:19:39 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:40 UTC