RFR: 8272137: Make Collection and Optional classes streamable

liach github.com+7806504+liach at openjdk.java.net
Tue Aug 17 03:42:27 UTC 2021


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

You can view the mailing lists at https://mail.openjdk.java.net/mailman/listinfo and subscribe there.
If you want to send a mail, just send one to say `jdk-dev` at `openjdk.java.net` (and carbon copy if you reply to a specific person so the list can see a copy)

----------------

On a separate note, @CC007 your model falls back to the fairly-old inheritance vs embodiment (extending a class vs using it as a field) debate. Nowadays, I think Java has evolved to reduce excessive reliances on inheritances, as there can be clashes (for example, a class cannot implement a comparator for two different type arguments). Also due to these potential of clashing, in a lot of java code, interface implementation classes avoid implementing multiple interfaces at once.

-------------

PR: https://git.openjdk.java.net/jdk/pull/5050


More information about the core-libs-dev mailing list