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

Re: Non-constructible constructors and Arrays

From: Cameron McCormack <cam@mcc.id.au>
Date: Tue, 02 Aug 2011 15:45:40 +1200
Message-ID: <4E3772E4.9010202@mcc.id.au>
To: Jonas Sicking <jonas@sicking.cc>
CC: Allen Wirfs-Brock <allen@wirfs-brock.com>, Alex Russell <slightlyoff@google.com>, public-script-coord@w3.org, Brendan Eich <brendan@mozilla.com>
On 2/08/11 5:24 AM, Jonas Sicking wrote:
> Seems better to me to instead make up a new prototype object which
> contains all of Array's non-mutating methods and stick that object on
> the prototype chain of various classes.
>
> But I'm happy to stick the Array prototype on the prototype chain here
> if that's what the JS folks say is the right solution.

It does mean, however, that we would need to list in Web IDL the set of 
Array prototype functions that get copied across for mutable and 
non-mutable NodeList-like objects.  If ECMAScript grows new ones, we 
would need to update that list.

> But like Boris points out, I think we need to be able to modify this
> on a per-interfaces basis. Either through a opt-in or a opt-out.

Are there particular cases at the moment where we know we would not want 
to opt-in to this?  I'm wondering whether there are such cases.
Received on Tuesday, 2 August 2011 03:46:24 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:04 UTC