@Allen: I guess that cloning the array into the arguments list is indeed heavier than needed. So when large arrays are used, a method that works on arrays will be better. But for small arrays of unknown size, spreading them looks like a nice syntactical help.
@Scott: those functions are indeed interesting too, but their implementation is a lot more complex AFAICS. If you need to code that natively, you'll be busy for a while. 2015-04-29 18:56 GMT+02:00 Allen Wirfs-Brock <[email protected]>: > > On Apr 29, 2015, at 9:04 AM, C. Scott Ananian wrote: > > > ... > > I suppose it would be nice if JavaScript engines fell back to passing > arguments on the heap to avoid this problem, but I don't think that's part > of the ES6 spec. Am I mistaken? > > that's an implementation detail. The ES spec. doesn't care whether or not > you employee multiple argument passing strategies in your implementation. > Personally, I wouldn't bother unless for some reason the implementation had > a very small (<10?) stack based argument limit. > > Similar, anyone who who wants to spread a large array into an argument > list is probably misguided. > > Allen > >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

