Re: RFR: 8272137: Make Collection and Optional classes streamable

2021-09-01 Thread CC007
On Mon, 9 Aug 2021 12:28:23 GMT, CC007 wrote: > create Streamable and ParallelStreamable interface and use them in Collection > and Optional > _Mailing list message from [Alan Snyder](mailto:javali...@cbfiddle.com) on > [core-libs-dev](mailto:core-libs-...@mail.openjdk.java.net):_ > > Ah,

Re: RFR: 8272137: Make Collection and Optional classes streamable

2021-08-17 Thread CC007
On Mon, 9 Aug 2021 12:28:23 GMT, CC007 wrote: > create Streamable and ParallelStreamable interface and use them in Collection > and Optional I believe that the accompanying JBS issue (JDK-8272137) can be closed. Maybe a mention of how the discussion in this PR was resolved (with code

Re: RFR: 8272137: Make Collection and Optional classes streamable [plug for Extensible interface]

2021-08-17 Thread Alan Snyder
This provides an opportunity for me to promote what I believe is a much more important missing interface, namely, an interface that supports a semantic replacement for type casting. Using type casting (instanceof) is a really bad way to test an object for an optional capability. The reason is

Re: RFR: 8272137: Make Collection and Optional classes streamable

2021-08-17 Thread CC007
On Mon, 9 Aug 2021 12:28:23 GMT, CC007 wrote: > create Streamable and ParallelStreamable interface and use them in Collection > and Optional Ah ok, I see your point. In the case that you want to have something be only `Streamable`, you can create an interface like this (fixed missing method

Re: RFR: 8272137: Make Collection and Optional classes streamable

2021-08-17 Thread liach
On Mon, 9 Aug 2021 12:28:23 GMT, CC007 wrote: > create Streamable and ParallelStreamable interface and use them in Collection > and Optional With modern java, you can always create a `Streamable` on your own (and have specifications/documentations that a simple `Supplier` lacks) and

Re: RFR: 8272137: Make Collection and Optional classes streamable

2021-08-16 Thread CC007
On Mon, 9 Aug 2021 12:28:23 GMT, CC007 wrote: > create Streamable and ParallelStreamable interface and use them in Collection > and Optional The List and Collection interface was almost directly taken from java.util (apart from the small feature interfaces, that I extracted from them), so it

Re: RFR: 8272137: Make Collection and Optional classes streamable

2021-08-16 Thread liach
On Mon, 9 Aug 2021 12:28:23 GMT, CC007 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

Re: RFR: 8272137: Make Collection and Optional classes streamable

2021-08-16 Thread CC007
On Mon, 9 Aug 2021 12:28:23 GMT, CC007 wrote: > create Streamable and ParallelStreamable interface and use them in Collection > and Optional Also, sorry for my Millennial lack of knowledge of older communication methods, but if I wanted to reply to a specific thread in a mailing list, how

Re: RFR: 8272137: Make Collection and Optional classes streamable

2021-08-16 Thread CC007
On Mon, 16 Aug 2021 03:39:02 GMT, Tagir F. Valeev wrote: >> create Streamable and ParallelStreamable interface and use them in >> Collection and Optional > > Mostly agreed with Brian. Judging from 7 years of using Stream API, I can say > that this abstraction would not solve any real problem.

Re: RFR: 8272137: Make Collection and Optional classes streamable

2021-08-16 Thread Paul Sandoz
On Sun, 15 Aug 2021 01:43:32 GMT, Brian Goetz wrote: > To reiterate: These issues were explored in the JSR 335 EG and it was agreed > that this abstraction did not carry its weight. Yes, we explored this when the Stream API was being designed. It's hard, if not impossible, to capture all

Re: RFR: 8272137: Make Collection and Optional classes streamable

2021-08-16 Thread Kevin Rushforth
On Sun, 15 Aug 2021 02:45:17 GMT, CC007 wrote: >> create Streamable and ParallelStreamable interface and use them in >> Collection and Optional > > I read through [these > posts](http://mail.openjdk.java.net/pipermail/lambda-libs-spec-experts/2013-June/thread.html#1910) > and while I did see

Re: RFR: 8272137: Make Collection and Optional classes streamable

2021-08-15 Thread Alan Snyder
Ah, if only one could define a type alias Streamable = Supplier>... > On Aug 15, 2021, at 8:42 PM, Tagir F.Valeev wrote: > > On Mon, 9 Aug 2021 12:28:23 GMT, CC007 > wrote: > >> create Streamable and ParallelStreamable interface and use them in >> Collection and Optional > > Mostly agreed

Re: RFR: 8272137: Make Collection and Optional classes streamable

2021-08-15 Thread Tagir F . Valeev
On Mon, 9 Aug 2021 12:28:23 GMT, CC007 wrote: > create Streamable and ParallelStreamable interface and use them in Collection > and Optional Mostly agreed with Brian. Judging from 7 years of using Stream API, I can say that this abstraction would not solve any real problem. If you need a way

Re: RFR: 8272137: Make Collection and Optional classes streamable

2021-08-15 Thread Alan Bateman
On 15/08/2021 14:29, Brian Goetz wrote: For the third time: This discussion illustrates why the PR was premature; the design was not agreed upon first.  High-level design discussions (i.e., "is this a good design", "is this a good idea at all", "are we solving the right problem", "does it need

Re: RFR: 8272137: Make Collection and Optional classes streamable

2021-08-15 Thread Brian Goetz
For the third time: This discussion illustrates why the PR was premature; the design was not agreed upon first.  High-level design discussions (i.e., "is this a good design", "is this a good idea at all", "are we solving the right problem", "does it need to be solved in the JDK") should happen

Re: RFR: 8272137: Make Collection and Optional classes streamable

2021-08-14 Thread CC007
On Mon, 9 Aug 2021 12:28:23 GMT, CC007 wrote: > create Streamable and ParallelStreamable interface and use them in Collection > and Optional I read through [these posts](http://mail.openjdk.java.net/pipermail/lambda-libs-spec-experts/2013-June/thread.html#1910) and while I did see good

Re: RFR: 8272137: Make Collection and Optional classes streamable

2021-08-14 Thread Brian Goetz
On Mon, 9 Aug 2021 12:28:23 GMT, CC007 wrote: > create Streamable and ParallelStreamable interface and use them in Collection > and Optional To reiterate: These issues were explored in the JSR 335 EG and it was agreed that this abstraction did not carry its weight. In any case, it is

Re: RFR: 8272137: Make Collection and Optional classes streamable

2021-08-14 Thread CC007
On Sun, 15 Aug 2021 01:07:10 GMT, Brian Goetz wrote: > I understand what you are proposing. I do not believe Streamable carries its > weight. That argument seems subjective. Could you elaborate on that in an objective manner? - PR: https://git.openjdk.java.net/jdk/pull/5050

Re: RFR: 8272137: Make Collection and Optional classes streamable

2021-08-14 Thread Brian Goetz
On Mon, 9 Aug 2021 12:28:23 GMT, CC007 wrote: > create Streamable and ParallelStreamable interface and use them in Collection > and Optional I understand what you are proposing. I do not believe Streamable carries its weight. Sent from my iPad > On Aug 14, 2021, at 8:53 PM, CC007

Re: RFR: 8272137: Make Collection and Optional classes streamable

2021-08-14 Thread CC007
On Mon, 9 Aug 2021 12:28:23 GMT, CC007 wrote: > create Streamable and ParallelStreamable interface and use them in Collection > and Optional Changed the title, since it seemed to cause confusion. - PR: https://git.openjdk.java.net/jdk/pull/5050

Re: RFR: 8272137: Make Collection and Optional classes streamable

2021-08-14 Thread CC007
On Sat, 14 Aug 2021 15:13:39 GMT, Brian Goetz wrote: > I object to this change. These issues were explored in the JSR 335 EG and it > was agreed that this abstraction did not carry its weight. In any case, it is > premature to bring a PR for a significant API change that has not been >