In this video, we'll delve into one of the most controversial topics in the world of object-oriented programming—inheritance—and why multiple inheritance generates so much debate among developers. We'll begin by identifying inheritance as the source of the problem, then move on to an analysis of why multiple inheritance was removed from the Java and C# programming languages, discussing the infamous "diamond of death" problem.
We'll then examine how Python addresses this problem with MRO (Method Resolution Order). We'll discuss the reasons that led the creators of C# and Java to abandon multiple inheritance, and the challenges language designers face when designing these features.
Watch this video to learn about the problems of multiple inheritance and how the deadly diamond of death arises in Python! You'll also learn that inheritance introduces rigidity and that composition should be preferred over inheritance. Subscribe to our channel to learn more about Python programming and the engineering nuances of code design!
00:00 Introduction
00:33 Inheritance - the Source of the Problem
01:36 Reasons for Rejecting Multiple Inheritance in Java and C# / Deadly Diamond of Death
03:04 Python and MRO / How Python Solves the Diamond of Death
05:09 Why Multiple Inheritance Was Banned in C# and Java
06:33 The Challenges of Programming Language Design
07:30 Rethinking the Role of Inheritance in OOP
09:00 Composition vs. Inheritance
Subscribe to our Telegram channel: https://t.me/engineerspock_it
Subscribe to our YouTube channel: / @engineerspock
Our courses: https://offer.engineerspock.com/