Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Superclass vs. Subclass structures
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00151975
Message ID:
00152112
Views:
22
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform