DEV Community

Discussion on: Death by Interfaces?

Collapse
 
macsikora profile image
Pragmatic Maciej

Instead of changing something in one place, I have to navigate to the interface and change it there as well. If there were any other implementations of that interface, I need to seek them out and make sure they’re changed as well.

Interface does not define the implementation so change naturally is less often as it's more generic. I think the case when one specific implementation effect the interface used in many other places is in most wrong approach.

Interface defines behavior of some group of objects then change of the interface should effect all, and it is a good thing.

If we have that one member is different from others then we need to think if the member fits the group, maybe not, maybe group was wrongly defined.

My biggest issue with class inheritance is method overload where we can have multiple level of inheritance with overloaded implementations. That means that probably our group is totally broken and the original class has nothing to it's members.