Stream and Iterator
Brian Goetz
brian.goetz at oracle.com
Sat Dec 1 16:19:01 PST 2012
Because the common understanding of "Iterable" is that you can
repeatedly ask for an Iterator. Yes, I know that the spec doesn't say
that, but that's how it's understood. Asking for an Iterator is not the
common way of accessing a stream's elements; it's an escape hatch.
Making it Iterable would only call attention to this and confuse people.
On 12/1/2012 7:02 PM, Remi Forax wrote:
> Why Stream is not Iterable now that it has a method iterator() ?
>
> Rémi
>
More information about the lambda-libs-spec-observers
mailing list