by mrkeen · 6y ago · 0 comments
If you're worried about long diffs because you changed many calls from '.x' to '.getX()', good. If it's so coupled that it's called in a thousand places, and you just changed functionality, it's on you to understand those thousand places. If it doesn't affect those places - which you don't know unless you look - then don't make the change.
As for the RgbColor example in the article, not using setters would be better.
RgbColor red = new RgbColor(1,0,0);
red.set(.., .., ..);
// Is it still 'red'?