Sam Vilain: # > We musn't dictate style. # # No, but we should emanate good style. And I consider opening # two class' # namespaces into the same stash to be very bad style.
We *must* support MI, delegation and interfaces in Parrot. Interfaces can probably be implemented in terms of MI and/or delegation, so why not do so? # Brent says that `attribute slots in a Parrot object are # private to the # object', so if you really do inherit from two classes, it # should be the # case that one class cannot access the other class' # attributes. But - if # the child class accesses an attribute which is defined in # both classes, # which does it get? Neither. Attributes are private to the class that created them. A subclass can't (well, shouldn't) access a superclass's attributes. # I think that case (MI two classes with clashing # symbols) should be a hard run-time error. If attributes are declared # explicitly, then this enables this test. In Perl 5, the # approach taken # with MI namespace clashes is to cross one's fingers ;). Alternatively, the approach taken with MI namespace clashes in Perl 5 is to let the programmer arrange the inheritance tree as he sees fit, and to let him explicitly delegate when there's no single arrangement that works. That's a lot more *useful* than a hard error. I can see a warning that can be deactivated, but not a fatal error. class A { method X { ... } } class B { method X { ... } } class C is A is B { ... } Making that a fatal error looks great on paper, but what if B::X was added in the latest version of B.pm? Do you really want a *fatal* error to appear on machines that upgrade B, but not those that don't? Do you have any idea what a nightmare that would be for module writers? A warning to the effect of "Methods A::X and B::X conflict in mutual subclass C", deactivatable with both 'no warnings <<oo>>' (or something) and 'method X is from(A)', would please me much more. The manpage can strongly encourage use of 'is from' when there's MI afoot. But we're in language territory again. Parrot has to deal with this issue in a flexible way, so always emitting a fatal error is simply not an option. --Brent Dax <[EMAIL PROTECTED]> @roles=map {"Parrot $_"} qw(embedding regexen Configure) >How do you "test" this 'God' to "prove" it is who it says it is? "If you're God, you know exactly what it would take to convince me. Do that." --Marc Fleury on alt.atheism