W3C home > Mailing lists > Public > public-html@w3.org > April 2014

Re: Elements array and query/queryAll methods

From: Rick Waldron <waldron.rick@gmail.com>
Date: Tue, 8 Apr 2014 15:05:26 -0400
Message-ID: <CAHfnhfq75a-TmjmhAnk7BMDtcknWV+fGU-Bg_xGjAw2VvvWUHw@mail.gmail.com>
To: Domenic Denicola <domenic@domenicdenicola.com>
Cc: Anne van Kesteren <annevk@annevk.nl>, Dean Edwards <dean.edwards@gmail.com>, Travis Leithead <travis.leithead@microsoft.com>, Eric Devine <devineej@gmail.com>, "public-html@w3.org" <public-html@w3.org>, "www-dom@w3.org" <www-dom@w3.org>
On Tue, Apr 8, 2014 at 3:04 PM, Domenic Denicola <
domenic@domenicdenicola.com> wrote:

> From: Rick Waldron <waldron.rick@gmail.com>
>
> > This is nothing more than a whim, but would a Set subclass be more
> appropriate?
>
> Possibly (although I don't think it would solve the "typed" problem at
> all; you'd just do `Set.prototype.add.call(elementsInstance,
> notAnElement)`). It conceptually seems better.
>
> However the ergonomics are pretty bad, and it's not what developers have
> been asking for (something jQuery-like). If sets had a *lot* more methods,
> it'd be more of a possibility. Also maybe if we were sure developers had
> embraced them.
>
> (Side tangent: I am hopeful the ES7-proposed bind operator + libraries of
> `this`-using "itertools" functionality can prevent us from having to add
> tons of methods to every collection class, and thus make `Set` and so on
> more useful without having to wait for standards-body work. Just an idle
> dream though...)
>

Thanks for further thought on this, and yes a shared dream ;)

Rick
Received on Tuesday, 8 April 2014 19:06:13 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:16:38 UTC