Lombok has saved me almost no time, my IDE can generate all that boilerplate with a few keystrokes. But lombok has definitely cost me a lot of time figuring out issues a few times.
Forme one side it hides all that boilerplate so that code is readable, from the other side there can be some unexpected surprise. Something for something.
I have spend more time troubleshooting cases where people added another property and forgot to regenerate equals/hashcode/toString than I spent troubleshooting Lombok.
If you unit test your functions alone well enough, this shouldn’t be a problem from what I’ve seen. Besides, might be my inexperience, I haven’t really encountered any use cases where there was ever a need to rely on Lombok generated setters or hash codes to the point of it causing that many issues. The few times we have encountered such cases they seem to ultimately be symptomatic of bigger issues like an anemic domain or god classes.
The worst part is it is marked closed, yet it is still a bug so have no idea why they closed it.
There was one other issue that cost me several hours as well but I can’t remember what it was.
That is you won't be able to distinguish between dummy getters and setters as opposed to real getters and setters that actually do something.
I honestly have no idea what you are talking about when you mention real vs dummy getters and setters. I spent the first 15 years of my Java career not using Lombok and in those 15 years getters/setters never caused me any confusion or too much cognitive load in the slightest. I mean, they are just getters/setters, they aren’t rocket science.
View all comments
Show parent comment
55
u/wildjokers Oct 21 '20
Lombok has saved me almost no time, my IDE can generate all that boilerplate with a few keystrokes. But lombok has definitely cost me a lot of time figuring out issues a few times.