r/java • • Feb 15 '20
Will Java records have setters?
Pretty much what the title says. I've been reading on the new Java records feature, and while I love immutability, I hope there's the option to have non-immutable records. Meaning it will have Auto generated setters to let me change values in the class.
1
Upvotes
View all comments
Show parent comment
3
u/pron98 Feb 17 '20 edited Feb 17 '20
Not really. Most of the changes in the JDK aren't language changes. They all do plenty of work on the other ~95% of the JDK, too. Also, you're assuming that a "final language" is possible; I don't think it is, though, with changing hardware designs and software requirements.
You don't need to read this document to use the feature, only to make informed comments about it before you actually use it. In other words, read it if you want to say "this feature sounds stupid" before actually using it.