Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does anyone have trouble with this statement
Message
 
To
10/05/2004 14:10:17
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00902540
Message ID:
00902551
Views:
18
>With regard to comparing Java and C++ to VFP...
>
>Because VFP is weakly typed, it doesn’t really care about interfaces – all it cares about is applying operations to objects (in fact, Java’s interface keyword would be wasted in VFP). This means that inheritance in VFP is different from inheritance in C++ or Java, where you often inherit simply to establish a common interface. In VFP, the only reason you inherit is to inherit an implementation – to re-use the code in the base class.
>
>thanks for your comments.
>
>John

I see what you are saying, in my experience there is a reason to inherit to define an interface. I've heard these called "template classes" but are similar to a template. For example a data object with something like. Aggreed the weak typing of VFP makes this odd, but it does setup a common interface for all of the business objects. Just a thought.

Define class aBusinessObject
oDataObject = .null.

Function Load(cPK as String) as Boolean
EndFunc

Function Save() as Boolean
EndFunc

EndDefine
Mark S. Swiencki
EPS Software www.eps-software.com
mark@eps-software.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform