Re: Why can’t for-of be applied to iterators?

Andreas Rossberg rossberg at
Tue Jun 11 06:21:53 PDT 2013

On 11 June 2013 15:16, Domenic Denicola <domenic at> wrote:
> I guess this is kind of the opposite direction Andy and Andreas have been going, but it does seem conceptually clearer to me to separate the concept of "something that can be iterated" (iterable) from "an instance of that iteration" (iterator). The former doesn't have state, usually, whereas the latter does. Hrm.

FWIW, I had argued for a cleaner separation along the lines you
suggest a while ago (see
However, I think not needing the notion of iterable at all would be
even better.


More information about the es-discuss mailing list