I had this thought recently that inheritance was a bad solution to languages not supporting containers natively. And or a lame attempt at code reuse. (A root class is an API/Service with no versioning)
Is this in reference to the type classes as seen in Haskell or something else?
I want to reach enlightenment but I'm stuck in Java for the time being.
Yes, as in Haskell type classes. Or Rust traits. Basically, anything that acts like an interface (defines a contract) but allows external definition. So you're not stuck wrapping your Integer in a ShowableInteger just to have an Integer that implements the Show interface.
[0] https://en.wikipedia.org/wiki/SOLID_%28object-oriented_desig...