Andrea, you seem to not understand what change is being discussed here. Nobody
is talking about removing or changing the behavior of Array.prototype.concat.
Please re-read.
________________________________
From: Andrea Giammarchi<mailto:[email protected]>
Sent: 2015-02-19 11:57
To: Domenic Denicola<mailto:[email protected]>
Cc: Allen Wirfs-Brock<mailto:[email protected]>; [email protected]
list<mailto:[email protected]>
Subject: Re: Array.prototype change (Was: @@toStringTag spoofing for null and
undefined)
> not evidence of real-world usage that would break popular websites
the Web is (still and thankfully) not about popular websites only.
Using the `Array.prototype` instead of creating instances in the wild has been
seen for long time, same way you don't do `{}.toString.call` but
`Object.prototype.toString.call` instead.
When a method like `concat` has no side effect to the prototype but can be used
as empty starting point for an Array creation, it's perfectly fine to use it as
such utility.
I am not sure that's the only exception though, and I don't have strong opinion
about this specific matter (there must be reasons to change and software needs
updates anyway) but I agree with Kyle that if ES6 claims backward
compatibility, it should stick with it.
This is a breaking change, small or big (famous/populare websites) is sort of
less relevant.
In github, as example, there's some usage already showing up:
https://github.com/search?utf8=%E2%9C%93&q=%22Array.prototype.concat%28%22&type=Code&ref=searchresults
I've also seen many `Array.prototype.concat.call([], ...)` which is extremely
pointless since that is the equivalent of `[].concat(...)` but from time to
time I use similar logic shown in Kyle example with reduce.
Again, I don't remember why these builtins needed such change, but things like
these should be probably announced as "potential breaking" so that developers
can be aware and eventually fix things here or there.
Regards
On Thu, Feb 19, 2015 at 4:38 PM, Domenic Denicola
<[email protected]<mailto:[email protected]>> wrote:
From: es-discuss
[mailto:[email protected]<mailto:[email protected]>]
On Behalf Of Allen Wirfs-Brock
> This looks like the sort of evidence we asked for.
I don't really think so. This is some tweets and books, not evidence of
real-world usage that would break popular websites and cause browser game
theory to kick in. Such evidence is best gathered by browser vendors making the
change and seeing what it impacts. I believe IE12/Spartan might already be
doing so---Brian, confirm/deny?
_______________________________________________
es-discuss mailing list
[email protected]<mailto:[email protected]>
https://mail.mozilla.org/listinfo/es-discuss
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss