At 05:22 PM 6/28/2001 -0500, David L. Nicol wrote:
>Garrett Goebel wrote:
>
> > > So every class has a vtable, which is a copy of its parents except for
> > > what is overridden within it, and a instance that wishes to
> > > deviate could make a local copy of its vtable and twiddle it.
>
> > Why not just fall back to the ancestor(s) unless it provides its own. What
> > good does flattening an instance accomplish that polymorphism doesn't?
>
>Dan S. says "Vtables are much lower level than this" but, what if they are
>used for method dispatch, the way C++ virtual methods work, on all objects,
>not just builtins?  I thought that was the whole point of them.

Nah, vtables are for hiding the implementation of variables internal data 
structures and to make manipulating that data be fast by stripping down the 
code path used to do that manipluation.

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to