Re:New Features in Java 14
by sa46 on Wednesday March 04, 2020 @12:11AM
(#22481368)
I don't understand what you mean by provably. The Java example does the exact same thing as the JS version: create a shallow clone with a different age. Do you mean the builder might do something different?
As far as adding the spread operator to Java, I think you'd have to require a Spreadable interface to use it or limit usage of the spread operators to records. It's not clear to me that the expressive power is worth it over a builder.
[ Parent
| on HN ]