begin quoting James G. Sack (jim) as of Fri, Mar 21, 2008 at 12:48:21PM -0700: [snip] > I enjoyed the video, and recommend it. > > One of Alex's remarks was exactly what you say CS, that inheritance > introduces coupling, and you should go into such arrangements knowing > what the tradeoffs are. He did say that he thought mixins were one of > the areas where inheritance especially shined.
"Knowing what the tradeoffs are" is wise advice. Minimize coupling (within reason), maximize cohesion (within reason). > Getting back to your original statement, I would concur that deep > inheritance trees are probably uncommon in terms of actually being > useful and justified. Very deep or very wide inheritance trees should probably be avoided. > Like others have said, I don't see inheritance as something to avoid. I tend to prefer composition, and restrict inheritance-via-sublcassing a bit more than I used to. -- Graph your hierarchy - is it wide, skinny, or a nice little balanced tree? Stewart Stremler -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg
