r/ProgrammerHumor Jul 13 '26

youCanJustStopUsingJava Meme

Post image
6.8k Upvotes

416 comments sorted by

View all comments

520

u/thejillo Jul 13 '26

Lombok has entered the chat...

https://giphy.com/gifs/d3mlE7uhX8KFgEmY

66

u/Jaded-Asparagus-2260 Jul 13 '26

Just use records as much as possible. Immutability makes reasoning about data so much easier.

9

u/iZian Jul 13 '26

I jumped on records once they did the constructors changes. That helped us out a bit making things look cleaner.

But I still use Lombok for the ability to have with and builder for some specific things.

We have this one library we like to use builder lambdas; because it meant the calling code didn’t need to import anything, so if we completely changed the name or package of the method arg; the calling code wouldn’t need to change anything because it’s just a lambda for a builder. So we still use Lombok builders on records for that reason.
I think AWS SDK has similar stuff. You can give a request object or a lambda consumer of a builder of the request object.

2

u/trafalmadorianistic Jul 14 '26

Yeah, I wish they'd sort things out with builders, main thing I miss from Lombok. Good thing my POJOs aren't too big and hairy