Pure win: Array.from and Array.of

Andrea Giammarchi andrea.giammarchi at gmail.com
Tue Jul 26 07:10:00 PDT 2011


glad somebody said that!

Also I would pollute performance oriented methods rather than "whatever
framework sugar" anybody could easily add where unique() and remove(all) may
be part of these cases while fill() could be superfluous.

Andrea

On Mon, Jul 11, 2011 at 6:01 PM, Allen Wirfs-Brock <allen at wirfs-brock.com>wrote:

>
> On Jul 10, 2011, at 12:09 PM, Dmitry A. Soshnikov wrote:
>
> > And by the way, an efficient `Array.prototype.unique` also would be nice
> to have, since in JS in general it's hard to implement it's efficiently (in
> lower level at least it will iterate faster).
> >
> > [1, 3, 2, 5, 5, 3].unique(); // [1, 3, 2, 5]
>
> Before considering adding too many things to Array.prototype we perhaps
> should start considering the protocol of a real collection hierarchy that
> goes beyond just arrays.
>
> Allen
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110726/899c7c0a/attachment.html>


More information about the es-discuss mailing list