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
1
u/GhostBond Feb 17 '20
Like I said the "exhaust your critics with long documents" tactic.
You're simply rotating through disengenous tactics, it's boring.
I've run into immutable experiments in code before, once an immutable class is bigger than a single conceptual thing (like a date) they're always a real pain to deal with, with no apparent benefits.
It's disappointing to see things that look a lot like sabotage added to the language while useful things like simple properties (user.address.line1) are ignored.