Joseph Ryan writes: > >It's surely possible by modifying that class's DISPATCH. > > > >Whether it should actually be in the language is up for debate. I'd say > >that if you need to do this with any frequency whatsoever, you're not > >thinking about roles right. A good example might be in order... :-) > > > > > > Well, what if the two classes you want to inherit from weren't > designed with roles in mind? For instance, there might be two > CPAN modules that each have a dozen methods that you want to > inherit, but they each have 1 that overlap whose conflict you > want to easily resolve.
C<forget> doesn't help you there. That would presumably forget I<both> methods, leaving you with none. That doesn't sound too useful. If you could add a SomeClass:: on the front of the method, like: class Foo is Bar is Baz { forget Bar::frobnicate; } That looks backwards. It would certainly make more sense to specify which method you want to use, as opposed to specifying all the methods but the one you want to use. A syntax that is the opposite of forget -- one that lets you specify which method to use without typing that parameter list twice -- might be useful, but it's trivial enough to, er, forget for now. I wonder whether it's possible to say: class Foo is Bar is Baz { method frobnicate := &Baz::frobnicate; } I know my syntax there isn't right quite. :-) > Besides, "the user is not thinking about XXX right" sounds like we > need to give a ++ to the pythonometer ;) Let's say someone came on here and asked how to use regexes to make a socket connection. Surely "the user is not thinking about regexes right"... or sockets. Luke