Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Who Called Me?
Message
From
02/11/2000 04:25:17
 
 
To
01/11/2000 14:11:20
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00436100
Message ID:
00437026
Views:
27
>Here is where you lost me:
>
>>One way or another, an OO language determines the caller & which particular version of a method should be used
>
>Can you explain this to me, or explain to me when an OO language has to do this?

When one class is derived (subclassed) from another it inherits the data & procedures (properties & methods) of the parent class. You have the choice of whether or not to redefine any of the methods of parent class. On calling a particular method for an instance of a class, a decision will be made at run-time of which class an object belongs to & whether it has it's own version of the method or if the parents method should be used (this may propogate back further if the parent was derived from another class). One obvious time this must happen is when an object is passed to a procedure as a parameter, at compile time it may not be known the particular class, so at run-time the system has to determine the class of the object to know which method should be used (or even if the object supports that method).

It just appeared to me that what was being done was using information that is available from the system to determine what the function should do, rather than have that information explicitly passed as a parameter to the function, which is basically what happens in OO languages.
Mike

"I can live with doubt and uncertainty and not knowing. I think it is much more interesting to live not knowing than to have answers that might be wrong." - Richard Feynman
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform