Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore the intricacies of proper inheritance in C++ programming through this comprehensive conference talk by John Lakos at CppNow. Delve into the importance of documenting essential software behavior while understanding the advantages of leaving certain behaviors undefined. Examine the concept of narrow versus wide contracts and their significance in creating robust class hierarchies. Review components, interfaces, and contracts in general, setting the foundation for a deeper understanding of inheritance. Prepare for an in-depth exploration of three distinct types of inheritance: Interface Inheritance from pure-virtual functions, Structural Inheritance from non-virtual functions, and Implementation Inheritance from non-pure virtual functions. Learn the specific criteria for proper contracts in each inheritance type, compare their relative utility, and discover common misuses of inheritance that should be avoided. Access accompanying slides for a visual aid to reinforce key concepts presented in this insightful talk.