> 2. State composition - doesn't it introduce all the problems of multiple
>> inheritance, moreover in a hidden form?
>>
>
> As Niclas said, I don't think that applies here, as all of the mixins are
> "next to each other" as opposed to "in a tree" as with inheritance. AFAIK
> we're fine on that one. If you have a particular problem that you're worried
> about, let us know.
>
Suppose we have the following situation:
BaseState{
Property<String> value();
}

DerivedState1 extends BaseSate{
...
}

DerivedState2 extends BaseSate{
...
}

Entity extends Role1, Role2, Role3, EntityComposite{
}

Role1Mixin{
@This BaseState state;
}

Role2Mixin{
@This DerivedState1 state;
}

Role2Mixin{
@This DerivedState3 state;

void doSomething(){
 state.value().set("XXX") // WILL CHANGE STATES IN ALL ROLES!
....
}

Jacek
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to