6 ms·
How so? Not sure what you mean. If object A calls a method of object B (composition), then B cannot call back on B, and neither A nor B can override any behavi
by ferd 10mo ago
How so? Not sure what you mean.
If object A calls a method of object B (composition), then B cannot call back on B, and neither A nor B can override any behavior of the other (And this is the original core tenet of OO: being all about "message-passing").
Of course they can accept and pass other objects/functions are arguments, but that would be explicit and specific, without having to expose the whole state/impl to each other.