On Wed, Aug 09, 2000 at 10:01:46AM -0400, Chaim Frenkel wrote:
> >>>>> "NI" == Nick Ing-Simmons <[EMAIL PROTECTED]> writes:
> 
> NI> So having the object carry around a (pointer to a) table to methods  
> NI> has merit. But how to index that table? Computing the union of all possible
> NI> method names for all possible classes and assiging each a slot in the table
> NI> will yield a very large table which for any particular class will be sparse.
> NI> Hence perl5's use of class's "stash" hash has where to store it.
> 
> 
> For the "my Dog $spot" case, that's not an issue, compile time resolution.

And why would an object of type Scotty which inherits from Dog not
be valid to assign to $spot. And if Scotty overrides some methods
you have a problem.

> But for the generic object. The package itself can contain an indirection
> table. This would be that sparse table with the offset in the object vtbl.

You mean like a hash, sounds familiar.

Graham.

Reply via email to