Python/Java OOish type question
jurgen.defurne at philips.com
jurgen.defurne at philips.com
Thu Aug 31 06:14:41 EDT 2000
I think that Java as an OO language is implemented well, that is You define a class as
an aggregate of functions and data.
Then, in the compilation, you will have a table with pointers to the defined functions and a system
which for instantiating your objects. Your object will consist of the following a parts :
a) A pointer to the table of your class methods
b) Space for the object members
So, the overhead for class functions in each method, should at most be one pointer. I say
at most, because this pointer is only needed in case of virtual functions. If the system
can be complete statically typed, then you don't need even this pointer in the created
objects.
Jurgen
More information about the Python-list
mailing list