Jean-Claude Beaudoin jean.claude.beaudoin@gmail.com writes:
So my question is: Which one is right?
I'd note that this is a major problem of how OO libraries or frameworks are defined. They very rarely specify or give any guarantee of when or whom will send a given message to a given object.
This makes indeed difficult to subclass and override methods in a sturdy way.
This is probably a reason why OO programmers nowadays tend to distance themselves from inheritance (using so called "flat" hierarchies), and like "final" methods a lot, which basically denies OO itself.
Otherwise, for your question, you didn't mention any metaclass. I'm not sure about it, but I would expect such methods from AMOP to be used consistently only when you define your own metaclasses.