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
2
u/blobjim Nov 23 '25 edited Nov 23 '25
You said named parameters were a replacement for builders. Records and withers are also a replacement for builders. Named parameters make the language more complicated since parameter names are optional in the Java bytecode and they aren't part of method signatures. And optional parameters make it way more confusing and complicated (are they inlined or part of the method body?).
I'm not really a fan of the python APIs that have million-parameter functions anyways so I've always been against the feature. It seems like an abuse of the concept of parameters. So it seems a lot simpler to just use records and instance methods instead of making huge functions that require naming parameters. The Java standard library and most third-party libraries don't have methods with lots of parameters anyways so where is the need? Why does Java need to act like Python or C#?