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. Unless Foo and the class that delegates to Foo both inherit from a common (abstract) superclass (ArrayInterface ? Dictionary ?) (Duh, this is just starting to sound like Java.) How do you override vtable methods from within Perl 6 ?