Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VB Classes
Message
From
28/12/1998 03:02:32
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00169994
Message ID:
00170678
Views:
19
>Also, some of the Init code would be the same for different data types which requires an additional method call that also slows down the Init. And, during creation of an object, we also have the overhead of the actual creation. That means locating all parent classes, loading them, evaluating the fields in the VCX table, etc.

You don't have multiple method calls made, each combination of parameter types has its own init method.

I will grant what you say about the costs of object instanciation, I still feel that the costs of explicit type checking are greater than implicit type checking because of all the interpreted code that is called. There are all the traversals of the symbol tree for every p-code token.

With multiple constructors, a unique id code can be generated for a set of parameter types. The id code is then used to lookup the appropriate init method to execute.
Previous
Reply
Map
View

Click here to load this message in the networking platform