I think you meant to put Lower barrier to entry in the pros and not the cons?
I'm generally in the pro Lombok camp for Java 11 apps. With newer code I will probably use records. Didn't get a chance to "really" build non-test code for the more modern version yet as I'm too busy with "real" code.
The one big complaint I hear from people on Lombok is that of reliability. That things fail "oddly". I think most of this tracks down to Lomboks implicit hashcode and equals implementations in most annotations. These conflict sometimes with caching and JPA due to problematic state changes.
If we're aware of these problems I think Lombok is pretty cool. But if I'll start a new project now I'll probably target 17 which makes it less useful.
I meant to put higher barrier to entry, good spot!
I have encountered some issues with equals and hash code for JPA entities. IDEs and static code analyses are often aware of this and warn you to implement your own.
I think it’s always a good idea to aim for the latest version and maybe make a call after a few weeks on whether you really need Lombok.
Shai Almog
Great post on an important subject!
I think you meant to put
Lower barrier to entryin the pros and not the cons?I'm generally in the pro Lombok camp for Java 11 apps. With newer code I will probably use records. Didn't get a chance to "really" build non-test code for the more modern version yet as I'm too busy with "real" code.
The one big complaint I hear from people on Lombok is that of reliability. That things fail "oddly". I think most of this tracks down to Lomboks implicit hashcode and equals implementations in most annotations. These conflict sometimes with caching and JPA due to problematic state changes.
If we're aware of these problems I think Lombok is pretty cool. But if I'll start a new project now I'll probably target 17 which makes it less useful.