3 ms·
Composition over inheritance, not only useful in CS but also in linguistics. It makes sense not because both use languages but because both manipulate non-physi
by satvikpendem 4y ago
Composition over inheritance, not only useful in CS but also in linguistics. It makes sense not because both use languages but because both manipulate non-physical abstraction and thus come up with similar paradigms.
Composition is akin to agglutinized languages where there is a base and affixes are added to convey concepts like subject, object, plurality etc, such as Chinese or Thai.
Inheritance is akin to fusional languages, like Latin, where each word is a root and changes (or declines) based on the aforementioned concepts by for example changing the word itself.
- frankus 4y agoI've always thought that English is like the PHP* of natural languages: ubiquitous, borrows from every other language, and wildly inconsistent. *I cut my teeth on PHP3 and haven't used it in over a decade, and I hear it's gotten a lot better.