Comment on Java.evolved: Java has evolved. Your code can tooparentComments−brunoborges6moTo be clear, Records don't have setters. They are immutable.−happymellon6moYeah, sorry, typo.Still they institutionalise getters, which is the opposite of what their argument was.−tadfisher6moWell, they don't have "getters" either, they have accessors; x() instead of getX(). It's still bad, but at least it doesn't enforce JavaBeans conventions, which is where getters and setters actually originate [0].0: https://en.wikipedia.org/wiki/JavaBeans
Comments
To be clear, Records don't have setters. They are immutable.
Yeah, sorry, typo.
Still they institutionalise getters, which is the opposite of what their argument was.
Well, they don't have "getters" either, they have accessors; x() instead of getX(). It's still bad, but at least it doesn't enforce JavaBeans conventions, which is where getters and setters actually originate [0].
0: https://en.wikipedia.org/wiki/JavaBeans