Dan Sugalski wrote:
not work.
>
> 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.
>
> Dan
Well said.
What about if methods (in parent classes) keep a list of what other
classes have inherited the method -- by method -- so they'll know
who to signal when one gets redefined?
Speaking as a well connected perl6 class,
When I change my ISA I would have to
* clear from my cache those which were inherited
and also, if applicable
* reset the function pointers in any op-nodes that refer to my
inherited classes(see below) to (text me) back from (functionaddress 0xwhatever)
* inform (issue a "definitioninvalid" message) to all the
classes that have actively inherited (we have a reference list for this too)
and inherited methods from me, on those methods -- on either all of them
or only those that have changed, if all I did was switch from a CAR::SPORTS
to a CAR::SPORTS::CANADIAN maybe all the methods are the same, so I could
check the methods that have been inherited from me and only issue definvalid
messages for the ones that are actually changed.
these would be ops that were tagged at compile time as going to be working
with specific classes and are therefore double-optimized
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
:wq