Hacker News new | ask | show | jobs
by reom_tobit 1871 days ago
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.

1 comments

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.
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.

I have done Java for 25 years and never felt any need for records. There are so many issues...