News for hackers. Stuff that matters.
Re:Why inheritance sucks by mrshoe on Friday August 20, 2010 @12:26PM (#1620812)
Here's a pretty good comparison of the two techniques: http://www.artima.com/designtechniques/compoinhP.html

Having worked with a lot of C++ code recently that employs both methods, I personally prefer inheritance for the majority of cases. One of my primary goals while writing code is to write as little code as possible. If I have to write wrapper methods to expose the interface of the back-end class I've composed, then I'm not achieving that goal.

There are no comments on this comment yet.