Lombok @JavaOne / "Ask the Architects"

10 views
Skip to first unread message

mbrinkma

unread,
Jun 11, 2026, 11:12:23 AM (yesterday) Jun 11
to Project Lombok
Hello,

I recently listened to this https://www.youtube.com/watch?v=DrF4dCC0daE&t=2022s and was annoyed about the negative opinions regarding Lombok given by Brian Goetz.

Just wanting to let you know about this and giving you the opportunity to react.

br
Michael  

Reinier Zwitserloot

unread,
8:46 AM (8 hours ago) 8:46 AM
to Project Lombok
Yeah, we saw. To borrow a phrase from gen Z: It appears we live rent free in their heads.

A few takeaways:

OpenJDK core team doesn't really care about boilerplate reduction

The very first response(Alex Buckley): The point of that question 'which version of java are you using' was setting up for an answer of '11' or perhaps even '17', so that the response can then be: Yeah, well, we solved the problem, modern Java (version 25+) has given you all you need! Just switch and ditch lombok! The idea that lombok is relevant for a dev team on java25 seems to be befuddling Alex.

I'm not sure we can take Alex's response as indicative for the entirety of the core OpenJDK team, but if they don't even know boilerplate is still a problem, of course they aren't going to address it.

And, as usual, of the entire OpenJDK team, Brian Goetz is by some margin the most erudite and well adjusted of the entire OpenJDK team. Of course we take exception to the word 'ill behaved', but he takes some time to explain what he means by that, and the gist is essentially correct.

Unfortunately from there it goes off the rails a bit: Brian then says that 'there is a version of lombok that is entirely well behaved'.

I take serious exception to that statement. This is negligently incorrect. In that: It's not just incorrect, we tried to get OpenJDK into a state where this could be the case, and every attempt, even a simple tiny little milestone towards it (any annotation proposal) doesn't even get looked at.

Brian then makes the same mistake Alex makes: Thinking that lombok's mission (reduce boilerplate) is obsolete, or at least well on its way there. Despite the fact that the question asker is on java25 and his team is badgering him to add lombok to the project.

We can see that in a few more objective ways: The IMO absolutely fantastic JDK 'with' proposal that would obsolete our `@With` and `@WithBy` and take a sizeable chunk out of the domainspace of what `@Builder` is good for, seems to be have been abandoned entirely or at least put on the backburner. The scant reasons that have been posted seem extremely exotic to me, which is, either way, bad news for those waiting on OpenJDK to deal with boilerplate: Brian and company either don't care, or, as any new language feature is generally evaluated by contrasting the good against the bad, the amount of 'good' that OpenJDK confers unto the notion 'less boilerplate' is outweighed by exotic concerns that I don't think bother 95%+ of java ecosystem denizens.

Lombok's service to the community as a boilerplate reduction tool therefore remains relevant despite what Brian says here. The mindset of OpenJDK is relevant, because the argument du jour of lombok detractors these days is almost always as first point "OpenJDK is now on the case therefore lombok is no longer needed". That statement is true if we look at what OpenJDK says but it is not true if we look at what OpenJDK does.

Brian said: "[Lombok is] propping up a coding style that we do not necessarily think is in the  best interests of java developers".

It's mostly the opposite. Without lombok, you are incentivised to engage in 'stringly typing' and such - using extremely generic types (`String`, `int`, `Function<Whatever>`) instead of more specific types. Java is nominally typed. Records help a bit but `@Value` is far more flexible. Without lombok you are incentivised to set state piecemeal - because a method with a long list of arguments is annoying and hard to read (due to lack of named parameters). But that means your objects can go through invalid state, or at least multiple states, and that's, no doubt, something Brian and co would consider 'not neccessarily in the best interests of java developers'. Lombok makes it easier than lombokless java to do this.

`@Data` exists and continues to do so. Evidently Brian and company don't know that lombok has a few more features than that one. Just like Java should be commended for continuing to support e.g. `java.util.Date` despite the fact it's a terrible design and has been obsoleted for well over a decade (the commendation is: Nevertheless they continue to support it!), the same goes for lombok. Instead, lombok is treated as if `@Data` is the only thing it has. This putdown is as relevant as a detailed breakdown of why java is a terrible language based solely on an analysis of `j.u.Date`.

OpenJDK's relationship with the community remains authoritarian

That sounds more dramatic than I want it to sound, but the word does apply. In political systems, authoritarian regimes are almost invariably terrible, so the word has a really bad connotation, but, in the python space, 'benevolent dictator for life' is used as a positive, whereas when that label is slapped on a world leader we all know what it means, so, in dev ecosystems one should not bring along the connotations, perhaps. Point is, that is clearly how the OpenJDK sees their role in the community. They make a decision. The opinion of the community is essentially entirely irrelevant to the process. That's not to say the OpenJDK core team doesn't care - they do. Java as an ecosystem still is vastly better versus other dev ecosystems at e.g. keeping backwards compatibility in mind, for example. But, they decide, amongst themselves, how to best accomplish that goal and they do not expect the community to respond. In fact, responses that operate on a peer level are usually taken as an offense.

And that last part really saddens me. The OpenJDK team is so defensive (see: Paul Sandoz' sneer about delombok and the `javadoc` tool). They appear to take any deviation from the community, even deviations against a roadmap that they haven't even communicated yet, as a slight. I don't know of anybody that is deeply involved in the java community that does not like java - quite the contrary, we love it.

Joseph Ottinger

unread,
11:10 AM (5 hours ago) 11:10 AM
to project...@googlegroups.com
I normally hate to just pile on, but this reply is so good that it’s worth it: 100% agreed. I tend to try to avoid lombok in my own projects, but that’s because I tend to use Kotlin - which doesn’t NEED lombok in the same way that Java does. Pretty much every project I work on, incidentally and as a primary developer, uses Lombok and benefits from it, and I consider the code in Lombok inspirational and not just aspirational - if the code I write to *replace* Lombok’s usage doesn’t measure up to what Lombok generates, I consider it a failure on my part. Even when I replace what Lombok does, Lombok remains a valuable standard.

I think the OpenJDK people are showing a certain crucial myopia here that harms the entire ecosystem.

------------------------------------------
Joseph Ottinger

To the beautiful and the wise
   The mirror always lies


--
You received this message because you are subscribed to the Google Groups "Project Lombok" group.
To unsubscribe from this group and stop receiving emails from it, send an email to project-lombo...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/project-lombok/e9b36c05-95d4-4e06-b437-aba9ea700d9dn%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages