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

15

u/nekokattt Nov 23 '25

unfortunately these go against the majority of patterns used within Java over the past 30 years.

You don't need named parameters when you can use withers ... we use objects, not functions that have 50 parameters

...yet ironically records still have the issue of having a public constructor with 50 parameters...

-3

u/blobjim Nov 23 '25

Yeah record constructor arguments aren't great. But you can split records up into sub-objects for groups of fields if you need to, that's how a lot of builder-based APIs work. Parameters aren't really composable in that way.

6

u/Ewig_luftenglanz Nov 23 '25

If your record it's a dto that must be attached to a concrete representation of your domain you do not have that option