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

Re: Non-constructible constructors and Arrays

From: Allen Wirfs-Brock <allen@wirfs-brock.com>
Date: Tue, 2 Aug 2011 09:04:06 -0700
Cc: Cameron McCormack <cam@mcc.id.au>, Jonas Sicking <jonas@sicking.cc>, Alex Russell <slightlyoff@google.com>, public-script-coord@w3.org, Brendan Eich <brendan@mozilla.com>
Message-Id: <CE557D78-6194-46CA-B918-B9C6BCAB046A@wirfs-brock.com>
To: Garrett Smith <dhtmlkitchen@gmail.com>

On Aug 1, 2011, at 10:39 PM, Garrett Smith wrote:

> On 8/1/11, Allen Wirfs-Brock <allen@wirfs-brock.com> wrote:
> [...]
>> Why do you need to explicitly list them.  Defer that responsibility to
>> ECMAScript. Just say that it is the generic mutating and non-mutating
>> methods of Array.prototype for the version of ECMAScript that is supported
>> by the implementation.
>> 
> Have ES5 committee considered separating or tagging the methods that
> mutate the array vs. those that don't, possibly even making this
> discoverable so that a program could determine what the object is
> capable of doing (please no try/catch on arrays).
> -- 
> 

Well, it's inherent in the ES specification's algorithm for each method whether or not it mutates its this value.  We might consider adding a non-normative note that further identifies such methods as mutating or non-mutating but that doesn't really add any additional information that isn't already available to browser implementors.

allen
Received on Tuesday, 2 August 2011 16:04:44 UTC

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