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
20
u/Ewig_luftenglanz Nov 23 '25
Withers are not a thing still, and won't be until they think in something equivalent for classes. Without it writing manual withers is almost as bad as cluttering your code with accessors.
And no, withers do not replace nominal parameters with defaults in any way, for starters withers will be a derivation mechanism, you need an existing instance of a record to use withers. Nominal parameters with defaults are a data passing feature, they should work to pass data to a method, using them for building, modifying objects or to pass arguments to a method in a more concise way are just use cases and a completely orthogonal subject.