Hi Raul,

2016-02-26 3:17 GMT+01:00 Raul Santelices <[email protected]>:

> Hi Lukas,
>
> Thank you for the prompt response. It's great to see toList() and so many
> other useful collector calls now available via Collectable.
>

They were there from the beginning ;) In fact, the lack of Stream.toList()
was the very reason I started jOOλ:
https://twitter.com/lukaseder/status/639802749878697984


> I agree that nobody would want to create a whole new collections hierarchy,
>

In fact, they do. I recommend looking at javaslang.com for that purpose...
Daniel Dietrich has re-implemented much of Scala's collection API for Java,
and he's experimenting with pattern matching and other funky stuff.


> but perhaps a program could automate the process of creating extensions in
> some other package (e.g. xjava.util) for non-final collection classes, or
> wrappers otherwise, which add the Stream members (or even Seq's members!)
> to the Collection interface.  Anyway, just a thought for a project that
> might be interesting and could unify collections and streams.
>

You can give it a shot. But here's my prediction:

While a Stream is a very short-lived, local data type that you usually
don't pass around, but use only to model a local processing pipeline,
collections are very public, general-purpose things. So, you're going to
put them in your own internal and public APIs in your software. Do you
really want to replace your existing java.util.List data types with
something like xjava.util.List all over your application? Even if the
latter extends the former, this is going to be a lot of work. But if you
don't declare your own type in APIs, then what's the purpose of adding it?

Long before Java 8, more useful collections APIs have been suggested, but
they never gained any traction because of the above reasons (unless perhaps
for performance reasons, e.g. when you need primitive type collections).

So, while you're obviously more than happy to give this a shot and build
your own collections APIs and prove me wrong :), we don't want to do this
for jOOλ.

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to