On Thu, May 24, 2018 at 7:02 PM, Isiah Meadows <isiahmead...@gmail.com> wrote:
>> With large arrays you can also run into a platform's stack size limit
>> with a large number of arguments. [snip]
>>
>> * Chrome v66: Between 120k and 130k entries
>> * Firefox v60: 500k - 510k
>> * Edge v41: 650k - 660k
>> * IE11: 250k - 260k
>> * IE8ยน: 5.25M (!) - 5.26M
>
> Wait, what? Of all things old IE screws up, this isn't one of them?

I know, right?

> Was the proposal `for (const i of y) x.push(y)`, like a mutable
> `concat`? I interpreted it as basically `x.push(y); return x` from the
> start, hence why I didn't see the point.

Sorry, that's my bad. The original from Jordi Bunster was indeed just
`x.push(y); return x`:

> Has anyone ever suggested Array.prototype.append as an
> Array.prototype.push which returns the array itself? It would be
> reduce-friendly, same as Set.prototype.add and Map.prototype.set.
>
> Someone has to have, right? ๐Ÿ˜Š

Somehow in my head it became a mutating verson of `concat`, possibly
because I've often wanted a mutating version of `concat`, but I don't
recall really wanting a version of `push` that returns the array.

`pushAll` looks good to me. (Re the desugared code: You don't need
that `this.length = index` at the end, though. :-) )

-- T.J. Crowder
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to