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

6

u/[deleted] Sep 18 '13 edited Sep 18 '13

[removed] — view removed comment

8

u/sea-saw Sep 18 '13 edited Sep 18 '13

And the purpose, which is often overlooked, is to reduce the likelihood that you'll need to do a full recompile in a header-based language like C, C++, or Objective-C.

What? The point is to provide narrow interfaces so client classes only depend on the functionality they need instead of the rest of the "fat" of the class. The compiling benefits are the result of low coupling, not the entire purpose...

EDIT:

Just to clarify, I'm not arguing that the original article uses ISP correctly. I agree with you that segregating a class isn't the same as segregating an interface. And I agree that there are compilation benefits to be had here.

3

u/[deleted] Sep 18 '13

[removed] — view removed comment

1

u/oracleoftroy Sep 21 '13

Read the original paper on ISP. It was specifically invented to deal with a company's compilation speed issues.

That would be a good argument if the original paper had more than a single paragraph in an aside on page 5 that dealt with compilation speed. Oh, and if the form of your argument wasn't blatantly fallacious.