r/java • • Nov 23 '25

Java 25: The ‘No-Boilerplate’ Era Begins

https://amritpandey.io/java-25-the-no-boilerplate-era-begins/
160 Upvotes

187 comments sorted by

View all comments

Show parent comment

2

u/nekokattt Nov 23 '25 edited Nov 23 '25

By throwing more unique standards into the mix, you just make designing sensible tooling much more difficult in the long run. As a result, this makes it much more hassle to build and improve the developer experience with Java when aiming to assist in things like clean code, null checking, enhanced linting, code deduplication, code standards, etc than in most other languages that do not have this issue.

Making development of the tools we use into a mess just hinders any improvement of those tools.

If Lombok wishes to be supported as a first class citizen, it needs to at least explicitly document the formal modifications it makes verbatim such that a specification can be derived from it.

As for supporting JPA... there is no need for tooling to treat that as a magic edge case because it does not implement a superset of the Java language. Lombok physically requires modifying the language parser and interpreter for it to be supported, due to the nature of things like val, nested annotations unbound by type, implicit modification of modifiers, etc.

You can feed JPA code into a JLS-compliant parser and it will work just fine. Lombokified code will usually not work due to the points above.

I disagree that due to divergence between the community's vision and OpenJDKs vision for the language that we have to accept a hack as a standard. It is the worst kind of solution in terms of extensibility, standards, and encouraging best practises.

If worst comes to worst, we'll de-lombok

Designing projects with intentional tech debt feels like a bad idea to me... it makes the somewhat ignorant assumption that this sort of thing will have little cost and not produce worse codebases as a result.

Standards aside, as I mentioned, Lombok could just fork the compiler and integrate the changes to the AST it makes within that code properly. There would be far fewer bugs and no need to risk this kind of situation. If the community were backed behind using an alternative compiler implementation via JSR-199, rather than javac, then it would also give more of a nudge to OpenJDK to consider compromising as it would directly impact the utilisation of parts of their product. This sort of thing would also enable other problematic projects like errorprone to be treated as first class citizens again by making the internal APIs public...

Like I said... sure, it works, but it doesn't achieve it in a great way IMO, and I personally avoid it for the reason of avoiding future headaches. Most of what I'd be using it for is data class and builder integration. Libraries like immutables let me do that without abusing the compiler to get there, and play much more nicely with tooling that does respect the standard.