develooper Front page | perl.perl6.language | Postings from June 2001

Re: Per-object inheritance in core a red herring?

Thread Previous | Thread Next
From:
Dan Sugalski
Date:
June 29, 2001 07:24
Subject:
Re: Per-object inheritance in core a red herring?
Message ID:
5.1.0.14.0.20010629095712.020d3e58@24.8.96.48
At 07:53 AM 6/29/2001 -0600, Nathan Torkington wrote:
>Dan Sugalski writes:
> > Doing it properly in a module is significantly more of a pain than 
> doing it
> > in the core. Faking it with a module means a fair amount of (reasonably
> > slow) perl code, doing it in the core requires a few extra lines of C code
> > in the method dispatch opcode function.
>
>Wouldn't you do it by swapping out the dispatch entry in the vtable?

Hadn't planned on having a dispatch entry in the vtable--I wasn't thinking 
it was really something worth localizing on a per-variable basis. Generally 
I've been trying to keep control flow out of vtables. Vtables are for data 
fetching/storing/manipulation. Opcodes are for control flow. Or so has gone 
my thinking.

					Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                      teddy bears get drunk


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About