Composition vs Inheritance

In most object-oriented code inheritance is perhaps the most fundamental technique of object reuse, but it has several flaws. Object composition is much more robust, and often more appropriate but still hasn't become popular. I beleive that this can be attributed to the fact that object composition is more verbose than it needs be. I propose the introduction of a new feature to modern OOPLs to alleviate this: delegation of interface implementation.



April 23, 2008
URL:http://www.drdobbs.com/architecture-and-design/composition-vs-inheritance/228701852

Terms of Service | Privacy Statement | Copyright © 2024 UBM Tech, All rights reserved.