3 ms·
From the post; "The problem, however, is that, while organizing program state into a hierarchy is easy, OOP demands that we then organize program state manipula
by yxhuvud 8y ago
From the post; "The problem, however, is that, while organizing program state into a hierarchy is easy, OOP demands that we then organize program state manipulation into the same hierarchy, which is extremely difficult when we have a non-trivial amount of state. Anytime we have a cross-cutting concern, an operation that involves multiple objects that aren't immediately related, that operation should reside in the common ancestor of those objects"
No, OO does not make any demands like that. You are totally free to make objects and classes out of processes and algoithms, and that is a good tool to do the kind of cross cutting concerns the article talks about.
- karmakaze 8y agoSo OP somehow inferred that OOP requires operations to only be carried out by 'ancestor' objects and fails miserably. What they call 'ancestor' objects also have nothing to do with OOP in hierarchy as it is not an is-a relationship by rather ownership/has-a that is common in many styles including composition over inheritance. Basically they don't know what they're talking about.