2 ms·
> I don't think inheritance is bad at all. It is very often the easiest way by far to model a problem. I think the point of the article is that in some (very p
by BeetleB 3y ago
> I don't think inheritance is bad at all. It is very often the easiest way by far to model a problem.
I think the point of the article is that in some (very popular) languages, inheritance comes with a lot of baggage - precisely because classes in those languages support 3 different use cases. It's not saying that your usage is bad, but that your language didn't provide you with the best tool(s).
A lot of how people use classes can be solved via ADTs - which are much simpler to grok.
A lot of how people use classes can be solved via namespaces/modules, but not all languages have good support for them - so they use classes.
Etc.