On 2014/09/10 14:46:37, arv wrote:
On 2014/09/10 14:22:07, rossberg wrote:
> On 2014/09/10 14:05:14, arv wrote:
> > https://codereview.chromium.org/363833006/diff/290001/src/harmony-array.js
> > File src/harmony-array.js (right):
> >
> >
>

https://codereview.chromium.org/363833006/diff/290001/src/harmony-array.js#newcode161
> > src/harmony-array.js:161: while (!(next = iterator.next()).done) {
> > On 2014/09/10 07:23:55, rossberg wrote:
> > > I think
> > >
> > > for (var next = iterator.next(); !next.done; next = iterator.next())
> > >
> > > would be much clearer. In fact, we shipped iterators, so you should be
able
> to
> > > say just
> > >
> > >   for (var next of iterable)
> > >
> > > and remove much of the boilerplate here... unless I'm missing something.
> >
> > Using for-of is going to be an observable difference due to IteratorClose
> which
> > checks and calls .return in case of an abrubt completion
>
> Oh dear, that thing...
>
> OTOH, shouldn't internal uses of iterators do the same then? (I seem to
remember
> that we discussed this, but don't remember the arguments.)

I just posted this to es-discuss

So where do we stand on the explicit iteration vs for..of thing? Can we switch
back to for..of?

(I've updated this CL for the first time in months now).

https://codereview.chromium.org/363833006/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to