News for hackers. Stuff that matters.
Re:Java's records, Lombok's data, and Kotlin's data classes by reom_tobit on Friday May 07, 2021 @01:39PM (#27078589)
Keyword being “may”.

Guarantees are nice. Especially if objects are going to be passed around every which way from Sunday. It allows you to better reason about what could happen, and where.

Java has taken a while to get there, but I’m glad that they have finally.

Re:Java's records, Lombok's data, and Kotlin's data classes by AtNightWeCode on Friday May 07, 2021 @02:17PM (#27078994)
Well, if you pass around objects and change their state records will not help. People who does this are already using immutable frameworks in Java to clone and change some field and then pass it along.
Re:Java's records, Lombok's data, and Kotlin's data classes by reom_tobit on Friday May 07, 2021 @05:03PM (#27080844)
Sure, things have been bolted on top of Java to allow this to happen. People have made use of them.

Java now has built in support for these things, so no longer will developers rely on third-party solutions.

This is great for the Java world, and for any languages that are being built on top of the JVM by extension.

I would politely disagree with your characterisation of it being just academic, as an engineer I find it incredibly exciting. Admittedly, my bar is pretty low for excitement these days.

Re:Java's records, Lombok's data, and Kotlin's data classes by AtNightWeCode on Friday May 07, 2021 @06:17PM (#27081467)
I have done Java for 25 years and never felt any need for records. There are so many issues...