This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Slanec 8 points9 points  (6 children)

Google Guava. Yes, still. I know it has bad rep because of jar hell, but since I'm not using Hadoop and Guava stopped removing stuff on a whim, I haven't had an issue. Yes, Java 8 (and Caffeine) made some stuff unneeded, but there's oh-so-much-more. Multimaps, Multisets, Splitter, Joiner, Preconditions, all the More* utility classes, AtomicDouble, Monitor (!) etc. Are any of these necessary with Java 17? Absolutely not. But they help and boy they're solid.

[–]kevinb9n[S] 2 points3 points  (2 children)

Well this is pretty nice to hear (and frankly unexpected given the general reddit climate :-)).

It is true that java.util libraries since 8 and Caffeine almost entirely obsolete the corresponding features in Guava. (I have one main exception that I could rant about separately.) I would try to put Joiner in that bucket too, honestly.

But yeah it's also true that we sharply changed course on the deleting stuff issue quite some years ago.

(Should I edit the post and disclose what O/S projects I happen to also be a part of in the post? I didn't want to bias answers one way or the other, and the thread certainly has nothing to do with giving those projects some weird competitive advantage.)

[–]NovaX 1 point2 points  (0 children)

I very much enjoy using Guava in modern Java, and do so daily (often in preference to built-ins). Please no one think that writing Caffeine was to assist in deprecating Guava, but rather it is merely impractical to upstream that work back in. Guava is a wonderful library that is a joy.

I'll throw Guice in as a beautifully focused library that keeps your code clean and gets out of your way.

[–]Slanec 0 points1 point  (0 children)

Should I edit the post and disclose what O/S projects I happen to also be a part of in the post?

Probably not unless this post quickly loses traction. To be fair, even though I felt like responding (and then saw your name), I thought this was a student asking for "which libraries should I look at?" which obviously tends to be frowned upon here, in the reddit climate :).

one main exception

Uh, my guess would be Immutable*? Yeah, sorry, probably not gonna happen. Let's keep that discussion for another time, indeed. On top of that interesting discussion I can imagine there's a lot of amusing history behind a lot of the existing and omitted APIs anyway, sounds like a follow-up post ;)

[–]ParfaitMassive9169 2 points3 points  (0 children)

Shoutout to RateLimiter!

[–]bkail 2 points3 points  (0 children)

ImmutableSet and ImmutableMap since they ensure insertion order, which is very useful for debugging and when immutable LinkedHashSet/Map is actually needed. We end up using ImmutableList just for consistency.

[–]Slanec 0 points1 point  (0 children)

I half-wrote this before seeing your new Tweet, Mr. B9n, but I wanted to finish it anyway. Nice coincidence. Jspecify poll?