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 Brian
Date:
June 30, 2001 00:47
Subject:
Re: Per-object inheritance in core a red herring?
Message ID:
Pine.BSF.4.10.10106300129330.17835-100000@brians.org
> > Having it in the core, in C[++], would be that much more efficient,
> > and that much less of a hack.  Maybe the tradeoff is that it
> > wouldn't work.  :-)
> 
> Everyone's making these assumptions, WHY WON'T ANYONE LOOK AT
> CLASS::OBJECT?!

It might not work, Schwern. And even if it did, it might be really slow.
Somebody should write an implementation first, and then tackle efficiency. 

Something like

  sub sub {
    my ($self, $method_name, $method ) = @_;
    *{ref($self).'::'.$method_name} = $method;
  }

for adding object methods would be a good start. I think I'll call it 
Class::Object.

Dan


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