4 ms·
I only use inheritance for what the author calls ontological inheritance. For example, I find it useful to represent expressions and statements. I prefer compos
by not2b 3y ago
I only use inheritance for what the author calls ontological inheritance. For example, I find it useful to represent expressions and statements. I prefer composition if I'm trying to reuse data structures.
- feoren 3y agoBut ontological inheritance is the worst kind. Because your ontology is wrong. Similar things are kinda different. Different things are kinda similar. Your ontology is based on the linguistic remnants of taxonomic garbage from hundreds of years ago. There's no shelf.
- not2b 3y agoNot the way I use it, which is very limited. If the similar things are kinda different I use something else, as well as design things to expose the differences where required.