>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only