Re:Java's records, Lombok's data, and Kotlin's data classes
by AtNightWeCode on Friday May 07, 2021 @02:33PM
(#27079214)
The standard way to do it is to mutate clones as always in Java. Typically by use of libraries that provide this. You really need very bad code to have to think about if objects are mutable.
[ Parent
| on HN ]
Re:Java's records, Lombok's data, and Kotlin's data classes
by slver on Friday May 07, 2021 @02:38PM
(#27079273)
Apparently you don’t know most immutable structures are optimized for modified cloning in ways mutables aren’t.
Re:Java's records, Lombok's data, and Kotlin's data classes
by AtNightWeCode on Friday May 07, 2021 @05:53PM
(#27081283)
This is Java.