W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2013

Re: Maybe we should think about Interface.isInterface functions again

From: Mark S. Miller <erights@google.com>
Date: Wed, 7 Aug 2013 13:45:56 -0700
Message-ID: <CABHxS9gydVeE-m7qiEvP+gpsDYyh+gTd8+ie-bZqUJ-w9n7d_Q@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Allen Wirfs-Brock <allen@wirfs-brock.com>, Anne van Kesteren <annevk@annevk.nl>, Jonas Sicking <jonas@sicking.cc>, Boris Zbarsky <bzbarsky@mit.edu>, Domenic Denicola <domenic@domenicdenicola.com>, Travis Leithead <travis.leithead@microsoft.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On Wed, Aug 7, 2013 at 1:24 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:

> On Wed, Aug 7, 2013 at 11:29 AM, Allen Wirfs-Brock
> <allen@wirfs-brock.com> wrote:
> > ES6 already has an Array.prototype.find method so you would probably
> want to
> > name your 'find' method 'findSelector'  or something else. Perhaps, it
> > shouldn't even include the word 'find' because it isn't clear to me that
> the
> > result is necessarily an element of the original collection.  Why not
> just
> > call these methods of Elements  'querySelector' and 'querySelectorAll'?
>
> Yeah, now that we have Array#find, I think "find" isn't the best name
> for this.  We were using it because that's what jQuery used.
>
> We don't want qS or qSA, because those names are way too long.
> However, IRC chatter led to the discussion of using "select()" as the
> method name, which seems pretty good.
>
> On Wed, Aug 7, 2013 at 11:57 AM, Allen Wirfs-Brock
> <allen@wirfs-brock.com> wrote:
> > On Aug 7, 2013, at 8:06 AM, Anne van Kesteren wrote:
> >> On Mon, Aug 5, 2013 at 4:48 PM, Allen Wirfs-Brock <
> allen@wirfs-brock.com> wrote:
> >>> We can't prevent people from writing poor code, but we don't have to
> be an enabler of it.
> >>
> >> As I understand things, part of the goal of TC39 is to be able to
> >> explain the platform in terms of JavaScript. Currently the platform
> >> has a ton of these identity checks. "Is /x/ a node", "is /x/ an
> >> element", etc. We should be able to explain those and I hope that
> >> symbols are going to give us that, although it will depend on the
> >> specifics I suppose.
> >
> > Actually, for ES6 it's looking like WeakArray is going to be your best
> bet for cases where such tests where the branding really needs to be
> unforgeable.
>
> Do you mean WeakSet, or is there some WeakArray object that's going to
> be added later?  (I guess an ordered WeakSet, more or less?)
>


There is no WeakArray in ES6. Allen must have meant WeakSet or WeakMap,
both of which would fit this use case.

Allen, please confirm. Thanks.



>
> ~TJ
>
>


-- 
    Cheers,
    --MarkM
Received on Wednesday, 7 August 2013 20:46:23 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:37:50 UTC