At 03:28 PM 8/11/00 +0100, Graham Barr wrote:
>On Fri, Aug 11, 2000 at 10:20:55AM -0400, Dan Sugalski wrote:
> > I think we're going to have to have a doubly-linked list going for 
> @ISA, so
> > when a parent package changes the child packages get changed too. It'll
> > make updates to @ISA more expensive, but if you do that then you ought to
> > be prepared to take a hit.
>
>You mean each package has a "I am inherited by" list which you could
>follow to change the cache entries. Hm, interesting...

Yup. Makes life easier in some ways, since you can propagate the changes. 
It also moves the expense of the update to the place the change is made, 
rather than forcing all sorts of ambiguity resolution code on the bits that 
do the lookups.

We'll know the inheritance hierarchy, and we'll know the contents of the 
package stash, so we can make sure markers ripple upwards. When an 
inherited package is changed we can propagate the changes.

That way, method lookup resolves to:
   use package method;
   if package method doesn't exist, start the AUTOLOAD calling sequence.

I don't mind if the AUTOLOAD bit is slower, since that's presumably the 
exceptional case. Plus we may end up calling multiple AUTOLOADS if the 
autoload propagation stuff goes in (and I sort of hope it does), so there's 
not much to optimize.

                                        Dan

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

Reply via email to