At 12:21 PM +0100 1/7/03, Rafael Garcia-Suarez wrote:
Dan Sugalski <[EMAIL PROTECTED]> wrote:
 Like I said, you can always use delegation to subclass an array,
 or limit yourself to an odd and restrictive subset of behaviour.
 (Basically just vtable method overriding)
Delegation has drawbacks compared to inheritance : you can't use
a object that delegates to class Foo where an instance of Foo is
expected.
I don't see any good reason for that. If we're providing a delegation scheme the delegated class should look like a subclass of the delegatee, even if it's not really and we're actually thunking the heck out of things)

How do you override vtable methods from within Perl 6 ?
A package/class with properly named subs/methods will do it, though Larry may require a property or attribute. You'll also be able to build them by hand and swap them in and out (potentially on a per-variable basis) if you need to.
--
Dan

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


Reply via email to