On Wed, Aug 09, 2000 at 11:53:56AM -0400, Chaim Frenkel wrote:
> >>>>> "GB" == Graham Barr <[EMAIL PROTECTED]> writes:
> 
> GB> On Wed, Aug 09, 2000 at 10:01:46AM -0400, Chaim Frenkel wrote:
> 
> >> For the "my Dog $spot" case, that's not an issue, compile time resolution.
> 
> GB> And why would an object of type Scotty which inherits from Dog not
> GB> be valid to assign to $spot. And if Scotty overrides some methods
> GB> you have a problem.
> 
> Not an issue. The offset to the vtbl would be the same. The same named
> method would have the same slot.
> 
> >> 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.
> 
> GB> You mean like a hash, sounds familiar.
> 
> Yup. But the vtbl approach allows us to merge op calls and user sub calls
> into one method.

Ah, you are suggesting something like,

every known sub name is assigned a number and each package has an array
and the op just contains an index.

These arrays would get big and a sparse array implementation would loose
most of the benefits it would have over what we do in perl5. But we would
also still need a big hash to convert to indexes for dynamic subname lookup.

Or am I missing it by a mile ?

Graham.

Reply via email to