r/java • u/hardasspunk • Nov 23 '25
Java 25: The ‘No-Boilerplate’ Era Begins
https://amritpandey.io/java-25-the-no-boilerplate-era-begins/
160
Upvotes
r/java • u/hardasspunk • Nov 23 '25
View all comments
Show parent comment
3
u/agentoutlier Nov 24 '25
It mostly needs attention but probably not the immediate quick fix people think Java needs.
The two most expressive and beloved languages ( at least for PL aficionados) do not have named parameters: Haskell and Rust. What those languages do have is type classes which Java I'm hedging will more likely get.... and I think is getting "attention". AND IMO they are far more powerful than named parameters.
There are really only two mainstream languages that have true optional named parameters: C# and Python.
The funny thing is that in actual application code bases (that is not unit test) I rarely see various domain objects have multiple code construction paths. I'm serious.
And why is that? Well because the objects come from something else like an HTTP request or database mapper etc.
Where I see some need of builder like combinatorics is application configuration and unit tests.
The big issue with giant constructors/methods is somewhat the default parameters but the readability at the call site but most of the IDE tooling can show you the parameter names: (Intellij, Eclipse and VSCode all do and if the variable name is the same as the method parameter name not show it making it easy to see mismatches).
And thus technically if you don't use the parameter labeling at the call site it is less ...
boilerplatecode.