2 ms·
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
by Too 9y ago
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.