|
|
|
|
|
by cousin_it
3449 days ago
|
|
I can buy a language without classes if it gives me these things: * Interfaces * Records * Abstract data types * All the above should use foo.bar() syntax Classes provide those things, which is good, but also provide implementation inheritance, which is bad. |
|
Inheritance isn't bad.
Abusing inheritance is bad.
For the record, you can also abuse composition, polymorphism, operator overloading, free functions, interfaces, records, and abstract data types. I've abused them all and seen them abused as well.
Inheritance is just another tool. Like all tools, we are expected to use them wisely.