API question/request: Array to Stream
Samir Talwar
samir at noodlesandwich.com
Wed Oct 2 02:55:35 PDT 2013
I quite like the semantic difference between "build me a new stream" and
"make a stream from this array". As long as this is something remembered by
the team working on a code base (which is on you, not Oracle), I'm in
favour of keeping both.
On Wed, Oct 2, 2013 at 10:25 AM, Richard Warburton <
richard.warburton at gmail.com> wrote:
> Hi,
>
> Oops, I hadn't noticed there were 2 factory methods at different places
> > doing exactly the same thing.
> > Won't this perpetually provoke the question "Which one should I use?"
> >
> > Since java.util.Arrays has such a complete set of Stream-creation
> methods,
> > maybe one could drop Stream.of(T...) in favour of Arrays.stream(T...)?
> >
>
> I did actually raise this issue before, albeit proposing dropping
> Arrays.stream in favour of Stream.of and the response indicated that this
> was unlikely to happen. It isn't really a big issue either way to be fair.
> I doubt the situation has changed since then especially given the reduced
> time budget available for implementing such changes.
>
> regards,
>
> Dr. Richard Warburton
>
> http://insightfullogic.com
> @RichardWarburto <http://twitter.com/richardwarburto>
>
>
More information about the lambda-dev
mailing list