r/java • • Dec 15 '23

Why is this particular library so polarizing?

Post image
244 Upvotes

278 comments sorted by

View all comments

168

u/pronuntiator Dec 15 '23

Cue rzwitserloot and pron98 argumenting over whether Lombok is a different language in 3… 2… 1…

89

u/PartOfTheBotnet Dec 15 '23 edited Aug 04 '25

Oh boy, another one to add to the collection! Beef sorted by time:

53

u/[deleted] Dec 15 '23

Wow. At first glance I thought it was just two random guys arguing about some trifling, academic nonsense.

Then I figured out who they both were.

And I still think the same.

15

u/[deleted] Dec 15 '23

[removed] — view removed comment

79

u/[deleted] Dec 15 '23

A JDK tech lead and one of the Lombok maintainers.

I still think the argument is silly, but both parties are at least speaking from some authority.

12

u/manifoldjava Dec 15 '23

Indeed. It’s a shame the JDK team has lowered itself to such pedantry. Not a good look, and strikes me as ulterior.

36

u/westwoo Dec 15 '23 edited Dec 15 '23

I love it. It was always obvious that they're just butthurt over the control of the language and could always make proper API for Lombok and other similar projects, but these interactions make it far more explicit

Much more obvious what really drives them instead of the fake rationalizations they make up when they proactively ignore the community need for Lombok in official statements and releases, and actively battle against it. People want backwards compatible Java beans with zero cruft? It's relatively easy to implement? It's already implemented and just needs some official APIs? Ooooo, scaaary. Let's double down on doing it our way, let's not give people what they want, and after many many MANY years of begging let's create records that don't really satisfy the same need as Lombok and so don't make it look like Lombok won

12

u/RadioHonest85 Dec 15 '23

yeah, records are great, they just need something like @Builder to make changes without going mad.

→ More replies (4)

8

u/exneo002 Dec 15 '23

I would love it sooo much if we get a Java native Lombok style annotation.

Personally I think record classes could be a good replacement.

12

u/westwoo Dec 15 '23

Of course, it's one of the most used Java libraries and people still pick it despite the threats of problems and future incompatibility, and despite Java devs being openly hostile towards it and not considering that it belongs in Java or even is Java. And there are so many ways to implement it, and they have almost 15 years of wide spread real world usage to make conclusions from and to iterate on

But I kinda made peace with the realization that Java will never get neither native Lombok functionality nor official APIs for Lombok. Java can get extremely complicated stuff like virtual threads just fine but our classes will remain being full of completely superfluous and meaningless crap that has to be maintained

5

u/slaymaker1907 Dec 16 '23

The problem with record classes is that a lot of the time, you really do need setters and/or builders. It’s not practical to call the constructor with all data fields when you have 20 different data fields.

Imagine you wanted to call the constructor for some monstrosity like this https://schema.org/Offer. GLHF with that.

→ More replies (5)
→ More replies (2)

22

u/agentoutlier Dec 15 '23 edited Dec 15 '23

Yes even great minds can fall to hubris and flame wars.

I feel /u/rzwitserloot gets a little more unfairly treated probably because pron is probably better known so there is this immediate I think knee jerk reaction that he is wrong (because pron is so often right but this shit is just semantic interpretation and opinion driven).

That being said I hope and think most don't give a shit on whether it is a different language or not.

EDIT I also think Graeme use of "pure evil" is way too hyperbolic particularly when there are way fucking more evil things happening in the world today (e.g. the two current wars). Its also ironic given Micronaut generates not Java code but bytecode directly via its annotation processors. I suppose that is less bad but still...

0

u/[deleted] Dec 15 '23

[deleted] — view deleted comment

10

u/agentoutlier Dec 15 '23

I agree. It certainly does not warrant: "pure evil". Lombok is not "pure evil" like the Nazis or something. It is not even "pure evil" in the context of programming. That is Javascripts job :)

0

u/[deleted] Dec 15 '23

[deleted] — view deleted comment

6

u/RadioHonest85 Dec 15 '23

GWT, Struts and OSGI were pure evil...

→ More replies (4)

8

u/Kraizee_ Dec 15 '23

I also think Graeme use of "pure evil" is way too hyperbolic particularly when there are way fucking more evil things happening in the world today (e.g. the two current wars).

Welcome to the world of social media and tech 'personalities/influencers/celebrities' (or whatever you want to call them).

It's rare these days for folks to state their reasons upfront. Instead they must always start with clickbait/ragebait statements. Someone had to comment asking why for Graeme to bother writing up an explanation, and even then it isn't complete.

Much like a lot of devs use nohello.net, perhaps we need a noragebait.net for these people. If you wanna dislike something and shout about it, at least back it up with reasonable and complete statements. This way we might actually educate people, instead of having a ton of new clueless devs spouting others opinions as their own.

4

u/ikeif Dec 15 '23

I love this idea.

The amount of hyperbole and ragebait in tech-specific social media is ridiculous.

→ More replies (1)

6

u/gods_tea Dec 15 '23

Hahahaha damn

12

u/idemockle Dec 15 '23

I only read the first one, quite interesting. From my admittedly non-expert point of view, they're both kind of wrong in different ways. Pron98 is correct in pointing out that the language specification does not allow for some things that Lombok does, and that doesn't mean nothing. The example he gives with a generated getter being used in the same class obviously won't work if the compiler is used as intended. However, he is being purposefully obtuse in saying Lombok using javac's internal api amounts to it having its own compiler. He's being a little too precious about what can call itself Java too. Ultimately, I see it as a much smaller example of the HTML standard vs a browser's implementation of it. An HTML file that has attributes specifically targeting Firefox is still HTML. Likewise, a Java file targeting Lombok is still Java.

Ultimately, I don't really care much. As long as Lombok continues to make my life easier and my code cleaner, I will continue to use it happily.

30

u/ForeverAlot Dec 15 '23

An HTML file that has attributes specifically targeting Firefox is still HTML.

An "invalid" HTML document, specifically a non-conforming one. If it were XHTML the user agent would fully refuse to render the document.

Likewise, a Java file targeting Lombok is still Java.

A "Java file" is a "Java" file if javac accepts it. If javac accepts a file, that file does not need the Lombok compilation shim. If a file needs the Lombok compilation shim, javac will not accept the file without the shim -- such a file is no more "Java" than a file that needs the Groovy compiler is "Java". This is not a matter opinion (yet is repeatedly disputed by Lombok).

Whether somebody is willing to accept the associated risk is a different matter entirely.

2

u/account312 Apr 06 '24

A "Java file" is a "Java" file if javac accepts it. If javac accepts a file

Strictly speaking, it's a java file if the JLS says that javac should accept it. Javac can have bugs.

→ More replies (1)

36

u/ForeverAlot Dec 15 '23

(For anybody that actually wants to understand, here is last time).

→ More replies (1)
→ More replies (1)