Loose end: spliterator() and stream() methods on Iterable
Paul Sandoz
paul.sandoz at oracle.com
Tue Jun 25 03:39:53 PDT 2013
On Jun 24, 2013, at 11:41 PM, Remi Forax <forax at univ-mlv.fr> wrote:
> On 06/24/2013 09:40 PM, Brian Goetz wrote:
>> After further thought, I think what this means is that we can move spliterator() up to Iterable, but not stream(). The reason for this is that some classes that implement Iterable<Integer> might prefer that their stream() method return an IntStream, not be forced into a Stream<Integer>. So putting stream() too high up in the hierarchy forecloses on this.
>
> I agree,
+1
Paul.
> Spliterator.OfInt is a Spliterator but IntStream is not a Stream.
>
> Rémi
More information about the lambda-libs-spec-observers
mailing list