> On Nov 2, 2005, at 9:02 PM, Jonathan Lang wrote: > > Let's say you have this: > > > > role A {method foo() { code1; } } > > role B {method foo() { code2; } } > > role C does A does B { > > method foo() { A::foo(); } > > method bar() { B::foo(); } > > } > > > > Should the following be valid? > > > > role D does C { method foo() { B::foo(); } } > > > > IMHO, it shouldn't, because D doesn't do B.
Additionally, D most certainly does B. That it does B through a proxy is irrelevant. Think about it this way - if you had Surfer and Dog and "SurferDog does Surfer does Dog", wouldn't you want to know that "class ScoobyDoo does SurferDog" does Dog? If SurferDog doesn't do Dog, how would ScoobyDoo do Dog? > I think this is too restrictive, D should be able to freely > disambiguate or override using anything it want's to. It need not be > related at all to it's subroles. To further expand on this, D's disambiguation of method foo() could be: role D does C { method foo() { Completely::Unrelated::foo() } } Rob