April 3, 2011
11:34 a.m.
On 04/03/2011 02:31 PM, Alexandre Bergel wrote:
Can you merge state? What happens with C.x uses T.x ? Methods of T will use T.x and methods of C will use C.x?
At the moment you can't, but in our slot library we have alias slots. So that we could use to do the same tricks as with methods: required slots, provided slots, "defrosted slots", ... I am lost. I understand that a trait have a class have a different scope of slots. But you cannot define C.x and T.x? Why?
Cheers, Alexandre T.x and C.x will be different slots. That's all. Go ahead and try it out ;) Install some uniquely named accessor methods on the trait and class that use the same instance variable.
cheers