4 ms·
> The "problem" in each case is that you have to modify code in a bunch of different places instead of one place. And by extension, different places include o
by akdas 6y ago
> The "problem" in each case is that you have to modify code in a bunch of different places instead of one place.
And by extension, different places include ones you don't own, and therefore can't change. For example, say you have an interface in your library that consumers of that library implement. If you want to add an operation to that interface, all consumers of your library, ones you don't even know about, have to support that operation.
But, if you want to add a new interface, consumers only have to implement that interface if they want to use functionality based around that new interface.
(And of course, the same applies in the opposite direction if you're using an operation-first approach.)