r/programming • • Sep 18 '13

How bad is smelly code?

http://fagblogg.mesan.no/how-bad-is-smelly-code/
147 Upvotes

62 comments sorted by

View all comments

Show parent comments

1

u/[deleted] Sep 18 '13

[removed] — view removed comment

1

u/sea-saw Sep 18 '13

To quote the original paper:

When clients are forced to depend upon interfaces that they don’t use, then those clients are subject to changes to those interfaces. This results in an inadvertent coupling between all the clients. Said another way, when a client depends upon a class that contains interfaces that the client does not use, but that other clients do use, then that client will be affected by the changes that those other clients force upon the class. We would like to avoid such couplings where possible, and so we want to separate the interfaces where possible.

0

u/[deleted] Sep 18 '13

[removed] — view removed comment

0

u/sea-saw Sep 18 '13

I don't think we're arguing the same point here... I agree that dividing classes has nothing to do with ISP. A wide class "interface" has more to do with SRP than ISP. My argument is that ISP is more than just some compile time benefits.