Dan Sugalski wrote:
> 
>...
> 
> Seems like a lot of overhead for a table of function pointers. If nothing
> else there's another level of indirection there, since the
> variable/object/whatever header and body are separate.

I don't know why they must be separate but I haven't thought about it as
much as you have.

Will Parrot have operators/functions that answer questions like: "is
this object an instance of that class" and "what is the name of this
object's class" and "is this class a subclass of that class"? Even Java
and C++ runtimes have some of these operators. Insofar as all of the
languages need them, it only makes sense that they go in Parrot. If you
want to implement it as an abstraction layer on pure vtables, that's
fine, but I don't think it should be in the language-specific domain.

Also, I don't think that in our languages the slow part of vtable lookup
is pointer indirection. It is more often string comparisons! One extra
pointer indirection is probably cheap.

 Paul Prescod

Reply via email to