Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Superclass vs. Subclass structures
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00151975
Message ID:
00152112
Vues:
23
>Again, it all depends. #4 might be entirely appropriate if there was no common interface needed among the classes; i.e. if there was no need to treat Vehicles polymorphically. In the VFP world, we don't descend all classes from a common base class, like they do in Smalltalk.

But this is to our disadvantage. I think that if VFP were truer OO, all controls would indeed be subclassed from the same 'control' class. Have you seen all the common code that Ken L put in each base class of the FFC in VFP 6.0? This would not be necessary if all controls shared a point of inheritance.


>#3 might well be the best solution, if the concept of moving doesn't need to be treated polymorophically.

But it does, I think this was the point of the question. If move were too general than the whole point would be moot. This situation is the very basis of the utility of polymorphism.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform