Check out Dart's iterators

Oliver Hunt oliver at apple.com
Sun Feb 10 11:55:58 PST 2013


Just a couple of questions on this wonderous topic:

* how is 'e instanceof StopIteration' intended to work across multiple global objects?
* how firmly are we wedded to this? I can't imagine there is too much code that currently depends on manually catching StopIteration given ES6 is not finalized yet, and iterators aren't widely available.

I do dislike the exception based termination, I _think_ i'd prefer next() and hasNext() style iteration over exceptions, especially given that for the most part these are hidden by clean syntax.  My personal concern with all of these is how they deal with nested iterators.

--Oliver

On Feb 10, 2013, at 7:57 AM, David Bruant <bruant.d at gmail.com> wrote:

> Le 10/02/2013 16:50, David Bruant a écrit :
>> Le 10/02/2013 16:21, David Bruant a écrit :
>>>> Many feel that exceptions for control-flow are a missdesign, myself included
>> That's the only part I disagree with and my answer applied to.
> s/disagree/agree...
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss



More information about the es-discuss mailing list