that you call a serious limitation? Ever heard of interfaces?
Seriously I have never ever come across once that I felt only being able to inherit from one base class is a limitation. You can inherit, by the way from several base classes indirectly (your base class inherits from another base class).
What do you think of delegates in C#? Tell me how much simpler and more elegant can it get? I do not even want remember how clumsy it is to get it wired up in C++. Or tell me how many hours if not days it takes you to code up a high throughput, low latency data flow network that runs concurrently. I get it up and running for you in less than 2 hours plus 1 hour testing and debugging for a simple project. I challenge you to get the same in less than 1-2 days running in C++.
P.S.: Actually you can have "synthetic" inheritance with interfaces. Plus you can manage changes and expansions of functionality with interfaces much more beautifully than through base classes. With interfaces you get to implement a much more important OOP principle much more elegantly through interfaces than base classes: Abstraction. You make it sound like as if its bad that the implementation of the interface is not provided, but its actually what allows the abstraction part to really shine.
Seriously I have never ever come across once that I felt only being able to inherit from one base class is a limitation. You can inherit, by the way from several base classes indirectly (your base class inherits from another base class).
What do you think of delegates in C#? Tell me how much simpler and more elegant can it get? I do not even want remember how clumsy it is to get it wired up in C++. Or tell me how many hours if not days it takes you to code up a high throughput, low latency data flow network that runs concurrently. I get it up and running for you in less than 2 hours plus 1 hour testing and debugging for a simple project. I challenge you to get the same in less than 1-2 days running in C++.
P.S.: Actually you can have "synthetic" inheritance with interfaces. Plus you can manage changes and expansions of functionality with interfaces much more beautifully than through base classes. With interfaces you get to implement a much more important OOP principle much more elegantly through interfaces than base classes: Abstraction. You make it sound like as if its bad that the implementation of the interface is not provided, but its actually what allows the abstraction part to really shine.
Quote from dom993:
The fact that a class X can inherit (be derived) from a single base class B:
// C#
class X : B { ... }
contrary to C++ where a class X can inherit (be derived) from multiple base classes B1, B2, ... Bn
// C++ only
class X : B1, B2, ..., Bn { ... }
Of course, in C# a class can *implement* multiple interfaces, but that's the thing - it has to provide the implementation for each interface it supports, and this is a world apart from inheritance.