[EMAIL PROTECTED] wrote:
> Anyhow, if you want Perl 6 objects to be able to act as if they're in
> their own class (ie. have their own methods, inheritance, etc...) how
> are you going to do this without having the moral equivalent of a
> stash associated with it?  And if you can do something that saves
> memory on object inheritance, why not apply it to class inheritance?

what if there was a core shortcut that hid the virtual methods -- the
selecte methods that are allowed to be overridden on a per-object basis
just like in C++

Without the core shortcut, you'd have:

        package moderatable_fido;
        sub new{
                my $self = {};
                $self->{sound} = \&dobark;
                bless $self;
        };
        sub dobark { print "Woof!\n" }
        sub bark { goto &{$_[0]->{sound}} }

incorporating such a declared virtual into Class::Object -- is it there
already?



-- 
                                           David Nicol 816.235.1187
                   "Perl was born in downtown Hell!" -- Matt Youell

Reply via email to