`.toArray()` for all generators

Andrea Giammarchi andrea.giammarchi at gmail.com
Wed Aug 28 14:51:59 PDT 2013

I completely agree with Rick plus this is what I meant in the other thread
when I've said I don't see the urge/need to deal with Iterators => Arrays
if not ending up with waste of resources as the one proposed here.

Somebody will need to write specs, tests, and implementations while we have
all possible tools to add a toArray method and all possible tools to have
something that works nicely with for/of ... so, why even bothering with all
this sugar when much more has to be improved?

Again, just my 2 cents.

On Wed, Aug 28, 2013 at 2:40 PM, Rick Waldron <waldron.rick at gmail.com>wrote:

> On Wed, Aug 28, 2013 at 11:02 AM, Forbes Lindesay <forbes at lindesay.co.uk>wrote:
>>  It would be nice from a readability point of view if
>> `iteratable.toArray()` could always be used as a substitute for
>> `Array.from(iteratable)`.
> Since both Array.from and [..spread] already covers every single iterable
> and arraylike case now and forever, there is very little benefit (none?) in
> also specifying a toArray method on the prototype of every object that is
> capable of creating an iterable.
> Rick
> _______________________________________________
> 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/20130828/7e5575b1/attachment.html>

More information about the es-discuss mailing list