Additional method on Stream
paul.sandoz at oracle.com
Mon Apr 27 15:23:57 UTC 2015
On Apr 27, 2015, at 4:56 PM, Stephen Colebourne <scolebourne at joda.org> wrote:
> Obviously, this is yet another possible workaround. But it is a
I don't consider it "just a workaround" :-)
> There really aren't that many rough edges with the set of
> methods added with lambdas, but this is definitely one. That Guava
> handled it specially is another good indication.
Tis conjecture, but perhaps it might have been different in post-lambda world?
One issue is there are zillions of possible more specific convenience operations we could add. Everyone has their own favourite. Some static methods were recently added to Stream and Optional in preference to such operations.
There has to be a really good reason to add new operations. I realize this use-case might be more common than others but i am still yet to be convinced that it has sufficient weight given flatMap + lambda + static method.
> BTW, I wait months before making this request to see if it really was
> common enough a pattern, but I'm confident that it is now.
Were you aware of the pattern using flatMap during those months?
More information about the core-libs-dev