|
|
|
|
|
by stiff
4425 days ago
|
|
While he might understand what he is talking about, based on a corpus of experience, people who learn about this "principle" as they learn to program do not typically understand it and tend to draw only the wrong conclusions from it. What makes for coupling, and how to avoid it, you simply learn with a lot of practice, and there are not many clearcut guidelines you can formulate, it all varies depending on the problem. At best you can read SICP and see how they decouple everything by doing lots of data-driving and dynamic dispatch and things of this sort. This is too vague to be a "principle", and only causes confusion. It is about as precise, and as useful, as the "write good code" principle. |
|
I consider myself fortunate to have written enough C++ to learn coupling and cohesion. When you screw these up in C++, you pay for it, over and over, through increased compile times and link times.