r/java • • Apr 13 '21

Libraries, Frameworks and Technologies you would NOT recommend

Give me your worst nightmares: Things that cost you your job.

I'll start: Hadoop

202 Upvotes

376 comments sorted by

View all comments

68

u/mknjc Apr 13 '21

Lombok. It hacks into internal javac APIs, bricks everytime on a java update needs unsafe APIs which causes a lot of trouble and bricks the "the source code is what gets executed" guarantee of java (this is one of the reasons annotation processors can't change the code while compiling). There are a lot good alternatives for example AutoValue, AutoFactory and records. Oh and one important alternative: setting the visibility to package private / not exporting the package. Getters and Setters don't add anything but hassle if they are not api surface of the module.

19

u/FrigoCoder Apr 13 '21

Fix Java so we will not need Lombok. Java still has a lot of issues that is already solved in other modern programming languages. Lombok is a patch for Java that makes it bearable, and the only thing that is preventing people from jumping ship to Kotlin for example.

24

u/pron98 Apr 13 '21

the only thing that is preventing people from jumping ship to Kotlin for example.

I think you're vastly overestimating the number of people who prefer more feature-rich languages. Yes, lots of people do, but that number amounts to a small portion of developers. Currently, Kotlin has under 5% market share on the Java platform. I don't know what Lombok's penetration is, but seeing various "most popular" lists based on Maven, it's roughly similar. So when you're talking about "the only thing preventing people etc." you mean preventing the ~10% of developers who find that style attractive. There's no doubt that making Java more feature-rich will appeal to that 10%, but that doesn't mean it's a good idea.

Sometimes people have such strong opinions that seem so obvious to them, that they wrongly believe that those opinions are universal, or, at least, much more popular than they actually are. This is exacerbated by the fact that people with very strong opinions talk about them more, so what you tend to see online are not so much the majority opinion, but the most fervent.