Array extras functionality for iterators

Brendan Eich brendan at mozilla.org
Sat Feb 4 15:23:28 PST 2012


Has anyone checked out or used 
http://docs.python.org/py3k/library/itertools.html ? Seems worth 
considering since ES6 generators are derived from Python generators.

Indeed, there's no way to detect an infinite generator ahead of time. 
Some array extras do not make sense even for very large arrays. Again I 
cite Peter Norvig's constraint-propagating-search-based Sudoku solver, 
which I ported to JS1.8:

https://bug380237.bugzilla.mozilla.org/attachment.cgi?id=266577

It definitely requires generators not arrays in places, to avoid 
exponential space blow-up.

/be

>


More information about the es-discuss mailing list