5 ms·
Object orientism is not inheritance. It is simply encapsulation and having functions attached to the data.
by vips7L 2y ago
Object orientism is not inheritance. It is simply encapsulation and having functions attached to the data.
- Tomte 2y agoThe Common Lisp Object System disagrees with functions being attached to data.
- kazinator 2y agoIt's possible that what we can express with the Common Lisp Object System is a generalization that isn't OOP. It goes beyond OOP and includes it. I.e. OOP is a style of programm organization (readily realizable under CLOS) where we associate operations with the leftmost argument and its type.
- mrkeen 2y agoFrom one point of view, yes. Another point of view is that it's a new kind of de-encapsulation. Apparently this is a 'global' variable: int variable = 0; void foo() { variable++; } void bar() { variable++; } but this is an 'encapsulated' variable: class MyClass { int variable = 0; void foo() { variable++; } void bar() { variable++; } } You can block the top one in a code-review because "global variable", and tell the developer to fix it by passing the variable in and out of functions when needed, but I have a feeling the bottom one's getting merged even if you object on the same grounds.