RFR: 8272137: Make Iterable classes streamable
Brian Goetz
brian.goetz at oracle.com
Sat Aug 14 13:28:19 UTC 2021
Starting with a PR is not the way to add significant API surface to the JDK. You have to first build consensus on the mailing list for the design concept before we start talking about code.
FTR, Interfaces like these were already discussed and rejected in the JSR 335 design discussions.
Sent from my iPad
> On Aug 14, 2021, at 6:00 AM, Rémi Forax <forax at openjdk.java.net> wrote:
>
> On Mon, 9 Aug 2021 12:28:23 GMT, CC007 <github.com+5381337+CC007 at openjdk.org> wrote:
>
>> create Streamable and ParallelStreamable interface and use them in Collection and Optional
>
> Hi Rick,
> I do not think that such interfaces are a good addition to the JDK,
> we do not want to promote the fact that you can create a Stream from an Iterable because the resulting Stream is not efficient (or is not as efficient as it could be) and we can already uses a Supplier<Stream> if we want to to represent a factory of streams
>
> See my comment on the bug for more details
>
> -------------
>
> PR: https://git.openjdk.java.net/jdk/pull/5050
More information about the core-libs-dev
mailing list