3 ms·
> until you change the implementation, while maintaining interface compatibility, which is the point How many times have you seen that done on the real world?
by marcosdumay 6y ago
> until you change the implementation, while maintaining interface compatibility, which is the point
How many times have you seen that done on the real world?
And how many times have you seen that done, and it not creating a lot of bugs because of the behavior change without interface changes?
Personally, I've seen the first one more than zero times. Not the second. Every single time somebody decided to mess with a setter or a getter, it broke the systems that depended on it, and things would have been much better if they simply changed the interface, so the problems would arrive at compile time.
- slver 6y agoThe behavior doesn’t change. The implementation does. Those are orthogonal. And yes I see it every day. The collection interfaces in Java have countless swappable implementations. Those are basically getters and setters on a vector. I also had to change entity storage to columnar for a project. Did that. Never had to change a line of code outside the entities.