Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is polymorphism?
Message
 
À
25/03/1999 12:23:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00200864
Message ID:
00202463
Vues:
17
>>What does happen when you have parent's with the same properties and methods and they conflict?
>
>The programmer must explicitly impiment the conflicting member function (C++ talk for method), this can be as simple as using the scope resolution operator to call the appropriate parent's member function.
>

Thanks. I see potential problems. For instance, A is based on B and C. B has a method that C doesn't, at that time, and A uses that method. Now someone comes along and adds the method to B...and it is something that you'd like a subclass of A to be able to inherit.

>>I am still not convinced that some of the uses of multiple inheritance can't be simulated in VFP.
>
>It is not worth the trouble. Multiple inheritance is too tedious to simulate, the language must support it directly for it to be easy to use. Look at the way FoxPro handles data, contrast this with handling data in other languages.

Well, I would have to see a real-life example of multiple inheritance to agree or disagree. And of course the point of a solution is to meet a requirement, and a requirement would never be "simulate multiple inheritance."

Joe
Joseph C. Kempel
Systems Analyst/Programmer
JNC
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform