java champions speaking out against lombok

2 years ago by Custodian6718 to c/java

This. Lombok was initially a fun hack, but its widespread use is causing more harm than good. Modern Java doesn’t need this.

Java champions and Senior engineers speaking out against lombok

Lysergid 8 points 2 years ago

Never had an issue with Lombok. Though I use only getters, setters, constructor and sneaky throws. And I don’t know what exactly they want to debug. It’s literally assignments in most cases. According to such logic, should all reflection based tool be removed too? I guess remove “bad” Spring and JPA/Hinernate then? What a nonsense

path: 0 16335111, hotness: undefined, score: 8, children: 1
Von_Broheim 1 point a year ago

I thought that the whole point of Lombok is that it's not reflection based, they explicitly refuse to use reflection as a design principle. Afaik lombok statically generates methods and classes at pre compile. That's why for example lombok does not support constructor inheritance or overloading.

path: 0 16335111 16508736, hotness: undefined, score: 1, children: 0
BlackEco 6 points 2 years ago path: 0 16334975, hotness: undefined, score: 6, children: 1
Custodian6718 1 point 2 years ago

thanks for extracting the original post. i only put the linkedin as a source because you can clearly see java champions on social media speaking out against lombok (which you obviously cant on the original post)

path: 0 16334975 16335237, hotness: undefined, score: 1, children: 0
state_electrician 2 points 2 years ago

I never saw a benefit in using Lombok, but I did run into issues with it. As it works outside the compiler, you are basically writing Java+Lombok. And as the article says, with an IDE and a recent JDK there is really no benefit provided by Lombok.

path: 0 16335402, hotness: undefined, score: 2, children: 2
cyberblob 2 points a year ago

Its just leaner:)

path: 0 16335402 16613940, hotness: undefined, score: 2, children: 1
state_electrician 0 points a year ago

I disagree. It looks leaner. But the code is still there and because it's invisible, it requires you to remember more.

path: 0 16335402 16613940 16621206, hotness: undefined, score: 0, children: 0
McMonster 2 points 2 years ago

Anything that does under-the-cover low level magic is bad. The deeper the magic, the worse. Spring is the particular offender here with the lengths it goes so to make you not use new and never be able to debug why something happens. Or worse, why something doesn't happen. We know how to deal with code, but not magic.

path: 0 16338747, hotness: undefined, score: 2, children: 1
Von_Broheim 1 point a year ago

There's no magic in lombok, they're just meta annotations for class generation, no different than having each end every class implement some very specific interface exactly the same way every time. It's for reducing copy pasting. Debugging it is not a problem, especially that you can see the generated classes in the library files. Spring on the other hand is a black box, because it does too much and has become very bloated over the years, the goal of Spring is not to avoid using new the point is simplifying dependency injection and composition. The most fried part is the transaction management imo, because it's too delicate in the way it has to be configured.

path: 0 16338747 16508871, hotness: undefined, score: 1, children: 0
glorkon 2 points 2 years ago

I personally switched from Java + Lombok to Kotlin. So Lombok isn't really needed anymore.

path: 0 16335534, hotness: undefined, score: 2, children: 0
java
java

@programming.dev

login for more options
2059
259
34

For discussing Java, the JVM, languages that run on the JVM, and other related technologies.

go to feed...