Point lambdaification of List/Set/Map

Stephen Colebourne scolebourne at joda.org
Thu Jul 11 23:49:07 UTC 2013


On 12 July 2013 00:04, Mike Duigou <mike.duigou at oracle.com> wrote:
>>> Implementation would ideally be via new dedicated immutable classes,
>>> however space could be saved by simply reusing the existing classes.
>
> I would prefer to use existing Collections implementations. Primarily because they have already been thoroughly used. Any reason to use new dedicated classes?

Google Guava is the model here. It has dedicated immutable classes
that are more efficient because they don't have the overhead of an
immutable wrapper.

If it has to be existing classes, then so be it, but the
implementation may suffer as a result.

I don't believe it can be changed later, as users may see the
implementation class as significant, perhaps via a serialization ID.
If it is considered acceptable to change the implementation class in a
later release, then I would be happy to accept reusing the existing
classes to get this into 8. Is it possible to get an opinion on a
later implementation class change?

>>> Is this something we could fit in? (Is resourcing the problem, or the idea?)
>
> Patches are *always* welcome and are usually more grease to make things happen than just a squeaky wheel. :-) Without a patch I wouldn't be willing to commit that this RFE would make it into Java 8.

I may be able to find time to do this. Or I may not. Other list
readers might want to chime in here and volunteer.

I certainly think it would be a popular addition.

Stephen



More information about the core-libs-dev mailing list