8

Because my application works with very large collections of integers, Eclipse Collections seems like a very useful framework because of its primitive collections. I've tested it already, happy to see significant performance and memory improvements - so much that I'm considering just ditching the JDK Collections altogether (even for parts of my application where the improvements wouldn't be noticeable at all) - mostly for the sake of being consistent and using only one collections framework.

But that may sound too good to be true - perhaps I am missing a key disadvantage in regards to ditching JDK's Collections for Eclipse's.

The only one thing that occurs to me is that whatever future update/feature Java may have in regards to collections, I may not be able to make use of it until Eclipse adapts to it.

Is there any reason I might not want to transition completely to Eclipse Collections?

1
  • 3
    I think there's none. As soon as you design your method's signature with the respectives interfaces (Collection, List, Set,....). These days, any Java app comes with countless dependencies. They are also affected by the vry same problem that worry you. Are not they?.
    – Laiv
    Oct 11, 2016 at 20:10

2 Answers 2

5

Eclipse Collections is a pretty mature library. It's been under development for over a decade at Goldman Sachs (it used to be "GS Collections") in order to handle larger collections with less garbage and some cleverer data structures. Goldmans has been pushing hard to get their name out there as a tech organization in recent years, so this is one of their community offerings. Disclaimer: I worked there a couple of years ago.

As with all such packages, you do tie yourself in - there normally has to be a good reason to break from using JDK standard libraries! - so whether that's a problem depends on the expected lifetime of your project (I've got a pile of Applets lying around that nobody likes any more!). I doubt the JDK will standardize/absorb the aforementioned clever data structures (why would they? there's a lively open-source ecosystem of them out there available to all who need them, and it's not a painful vacuum like date/time was); I guess it's possible that Java10(+) value-types might make the primitive collections less valuable, one day.

Before it was released as an Eclipse project, I'd have applied similar rules as with using Guava (with equivalent concerns about corporate dependency, etc). It's an Eclipse project now, so it's probably more comparable to using an Apache library.

1

I've used Eclipse Collections (aka GS Collections) exclusively for the last several years with no concerns (beyond the usual concerns of using a third party library). The API support for Lambdas is super expressive and powerful.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.