I don’t like inheritance.
It doesn’t fit how I think about computers working.
Neither does it fit how I think about the problem domains.
It does have an efficient implementation via the v-table, which I first learned of from C++.
Scheme provides functional programming where functions are passed as arguments to functions.
That doesn’t fit about how I think of computers working either but it fits several kinds of problem domain that I work in.
I was just reading the description of JavaScript by ECMA and was surprised to see inheritance described so as to remind me of the LISA (and much later Mac) concept of Stationery a computer idea that I do like.
In the LISA GUI I would click on a frozen (immutable) document of particular application and thereby get a new unfrozen one whose mutable state was initially that of the frozen stationery.
Mutable and mutated documents could be frozen and become new stationery thereby.
I could change the font in a mutable document, if it was LisaWrite, for instance, freeze it and now I had changed my font “preferences” for LisaWrite documents, especially if I hid the original stationery.
This seems vastly superior to the more modern “Preferences” pattern where I know neither the site nor the scope of my changes.
By site I mean the thing I can grab hold of and duplicate, delete or move to another computer; the one among several that I can choose depending on the occasion.
By scope I mean “When in the future will my preferences be honored?”.
See this note about my worst experience with preferences.
ECMA describes the object nearly as I would describe a Keykos directory.
It is a map from ascii strings (or perhaps symbols) to values.