News for hackers. Stuff that matters.
Re:Data Classes for Java by Too on Thursday November 02, 2017 @01:46AM (#15608116)
The scenario being discussed was a class which changed its internal representation without breaking it's public api.

A getter can then by definition not simply refer to only a field anymore as that field is gone. It might have done so in the first version of the class where Fahrenhet() simply returned your fahrenheit field(a getter) but now we've removed that field and replaced it with a celcius field. That means Fahrenheit() doesn't just return a plain field anymore, there is some transformation going on. It's still considered a getter.

There are no comments on this comment yet.