3 ms·
While I agree that most of your listed examples are likely esoteric enough to escape need in most projects, I am curious to know why public vs private inheritan
by basilgohar 8y ago
While I agree that most of your listed examples are likely esoteric enough to escape need in most projects, I am curious to know why public vs private inheritance was amongst them, being that it is a core feature of nearly all object-oriented programming languages.
- dpark 8y ago> I am curious to know why public vs private inheritance was amongst them, being that it is a core feature of nearly all object-oriented programming languages. Private inheritance is not "a core feature of nearly all object-oriented programming languages". C# doesn't support this, nor does Java. I don't believe Python or Javascript support this in a first-class way either.
- lordnacho 8y agoI think in Python everything is "public". C# it's been a while, I think you're right though. If you came from either of these languages and read a c++ file, you'd eventually wonder why there's this extra keyword in the inheritance specifier.
- lordnacho 8y agoIt's just one of those things that turns up in quizzes, what happens to the public/private/protected marked members when you change the inheritance level? Does it really matter a whole lot? Probably not. Luckily you will find the answer quite quickly if you search for it.