[Tutor] Calling method in parent class
spir
denis.spir at free.fr
Tue May 12 19:23:53 CEST 2009
Le Tue, 12 May 2009 17:43:24 +0100,
"Alan Gauld" <alan.gauld at btinternet.com> s'exprima ainsi:
> > Having two methods with the name that both need two be used
> > on the same object is clearly a design flaw. What do you think?
>
> Two methods only one message. It is what polymorphism is all about.
Well, I do not want to argue. But this is not what I call polymorphism.
Not "on the same object". Polymorphism as I know it rather dispatches depending on the object (usually it's actual type).
The kind of exception beeing the case of one method calling the other (as I related later in the same post). But it still is not is calling 2 methods with the same name on the same object. It's rather one method reusing another.
Denis
------
la vita e estrany
More information about the Tutor
mailing list