3 ms·
One thousand times this. The best way to design flexible and maintainable systems is to encourage small and simple objects and functions that can be asked to co
by Jare 14y ago
One thousand times this. The best way to design flexible and maintainable systems is to encourage small and simple objects and functions that can be asked to collaborate together via well defined interfaces. This collaboration will always require some objects to provide information that other objects and functions can use.
In addition, the fact that part of an object's interface is the same as its implementation can mean that the implementation details are exposed (sounds bad), or that the implementation closely matches the interface (sounds efficient). Use your brain, not a canned rule, to decide which one of those is happening in your code.