Hacker News new | ask | show | jobs
by arez 1547 days ago
what about lombok? Edit: just curious if you think it's standard
3 comments

Lombok seems to have a 50/50 split of people who love / hate it. I am firmly in the No Lombok camp! My reasons are;

* IntelliJ is very good at generating boilerplate getters / setters etc

* I found sometimes the annotation processor would get out of sync with the IDE resulting in compilation issues until the processor was run again

* Java 17 records replace a lot of the functionality

As far as I can tell the lombok is certainly less used than say 5 years ago.

Java records can help somewhat but as others point out, theay are not compatible with JPA, sometimes you get real value from Lomboks @Builder etc.

On the other hand if you combine lombok and JPA entities you can easily shoot yourself in the foot (autogenerated hashcode and equals can cause issues in some cases)

With records now being supported in Java, wouldn't Lombok be less needed?
Unfortunately not. Records are not compatible with JPA, so classic beans with getters and setters would still be a choice for many people. Record-friendly ORMs do not exist yet (I’m currently working on one).
Could you please share your ORM? I would really like to use java with much less reflection.
If you can send me an email at oss+hn[at]esoftworks.com, I will let you know when I will have beta quality code on GitHub. This is a personal side project exploring annotation processing and targeting modern Java (17+), some results will be ready probably in 2-3 weeks.
Feel free to star this repo and comment: https://github.com/ivan-gammel/orm16