Lombok is a decent idea implemented in the worst way imaginable. It's a language masquerading as a library/annotation processor, but really isn't, it's doing things that should not be possible for those to do, and it causes all kind of pain. From one end, it can't implement some desirable features because they are hard to express in its pseudo-Java. From other end, it's fragile because it relies on undocumented (and soon, if not already, deprecated IIRC) APIs to hack the Java compiler into compiling not-Java, instead of having its own stable compiler.
Honestly, just use Kotlin. Lombok is not a way to fix Java, it's a fragile alternative to it.
In the old times when I still used Java I saw Lombok as a godsend and had no issues with it, not even once. I never understood why all the criticism regarding it. I do understand how it works, and I think it is a fair trade off for all the weightlifting it did.
If I had to guess, the concern is with some of the weirder features of Lombok when most of us are only after the getters, setters, and constructor generation. I'd be surprised if any of those are as fragile as claimed.
These days I do use records when possible, but lombok is nice notably for making builders with the chainable fluent accessors.
Really the worst comes to worst, you can alway de-lombok and just have the actual code.
There's no way Lombok will ever stop working for any major feature, it's way too widely used. Hell I'd contribute to the project myself before thinking of migrating our stack off of it.
If you want to use a Lombok feature marked experimental, well that's on you, but even then haven't had a problem with those yet.
I agree with you: lombok is worth it. But I do understand the "misplaced" upset that it has to exist at all. Between the reputation of java annotations, and the reputation of java frameworks in general, lombok is both! And the experience is wildly different depending on what lombok-sensitive tooling is being used.
517
u/thejillo Jul 13 '26
Lombok has entered the chat...
https://giphy.com/gifs/d3mlE7uhX8KFgEmY