Am 22.08.2013 um 22:03 schrieb Juraj Kubelka <juraj.kube...@gmail.com>:

> 
> El 22-08-2013, a las 14:12, Stéphane Ducasse <stephane.duca...@inria.fr> 
> escribió:
> 
>>>> 
>>>>> Does pharo support runtime trait composition or does it only work on 
>>>>> class definition time. I mean something like
>>>>> 
>>>>> anObject addTrait: MySpecialCapability
>>>>> anObject removeTrait: MySpecialCapability
>>>> 
>>>> Nope :)
>>>> traits are static :)
>>> 
>>> Sad. You know I was not asking about trait but about runtime composable 
>>> behavior. I'm not sure what you mean with "traits are static". If traits 
>>> are static in pharo that's fine. If you think traits are static by design 
>>> then I was looking for something that has a different name :)
>> 
>> :)
>> 
>> What I think is that traits are cool but not powerful enough but even the 
>> ones that we have right now 
>> makes the system more complex and this is what makes me sad :) I would 
>> prefer something more powerful 
>> and simpler: the graal :)
>> 
>> Stef
> 
> Interesting. Is it only problem of system complexity? I have the impression 
> the problem is that people do not changed his mind in order to think in 
> traits. (or generally speaking in any other system like mixins, aspects, 
> etc.) It looks like objects with single-inheritance are simple and powerful 
> enough. 
> 
I think system complexity matters a lot because it is one of the facts why 
software systems fail. If "people do not change their minds" it is a question 
about the timeframe you watch people not adjusting. People do not like to 
change but if things are there they may adjust to it (slowly). Being fast in 
judging something down is as good as not recognizing that an approach is 
suboptimal. To be honest while looking at all the people I've met in my career 
I couldn't find that people have adjusted to OO (,yet). This could indeed be a 
sign that the whole approach is not applicable.

I found traits an interesting approach in the beginning but I don't really like 
them how they are. I'm not sure if this is dependent on traits or the fact that 
I have doubts that classes are a good approach. At least I would like to have a 
looser/lighter approach to compose some behavior at runtime. Just like we do 
not only have compiled methods but also blocks. 
To me behavior composition is less about defining types like we do with static 
traits. It is more about adjusting behavior at runtime depending on the 
execution context. 
We have a single inheritance system that is good. And we use a lot of 
delegations to escape the limits of this approach. Bringing this spirit closer 
to the language enables IMHO more expressive programs and could enable a lot 
more things.

 my 2 cents,

Norbert 
> Or maybe any system like traits have not come with efficient enough IDE?
> 
> Cheers,
> Jura


Reply via email to