Array methods applied to strings

James Graham jgraham at opera.com
Tue May 12 00:57:43 PDT 2009


Mark S. Miller wrote:
> On Mon, May 11, 2009 at 12:29 PM, Erik Arvidsson
> <erik.arvidsson at gmail.com> wrote:
>> I think the right solution would be to use a non throwing [[Put]] for
>> the Array methods for backwards compatibility.
> 
> On IE: [].pop.call('abc') === undefined
> 
> Since IE mutating array generics don't work on strings, cross-browser
> web content[1] does not depend on these working on strings.

I will try and think about more of the issues here when I have a little 
more time, but in the meantime I think it is worth noting that this 
argument assumes that the same code is being executed by all web 
browsers. Since it is common practice to differentiate code path based 
on UA, it is quite possible that changing this behavior would have 
serious compatibility implications for non-IE browsers despite the lack 
of IE support.


More information about the es-discuss mailing list