Re: [Pharo-users] Trait composition on runtime

2013-08-23 Thread Johan Fabry
On Aug 23, 2013, at 9:54 AM, Norbert Hartl wrote: >> Metaprogramming is your friend :-P >> >> Actually this is only half jokingly … one of the ideas of metaprogramming is >> that the programmer can mold the semantics of the language to his/her liking >> depending on the task at hand. This (am

Re: [Pharo-users] Trait composition on runtime

2013-08-23 Thread Norbert Hartl
Am 23.08.2013 um 15:44 schrieb Johan Fabry : > > On Aug 23, 2013, at 3:48 AM, Norbert Hartl wrote: > >>> would strategy not solve your problem? >>> >> Sure if I would have an actual problem I would use strategy to mitigate the >> problem. With strategy you can extend the single dimensionalit

Re: [Pharo-users] Trait composition on runtime

2013-08-23 Thread Johan Fabry
On Aug 23, 2013, at 3:48 AM, Norbert Hartl wrote: >> would strategy not solve your problem? >> > Sure if I would have an actual problem I would use strategy to mitigate the > problem. With strategy you can extend the single dimensionality of single > inheritance but you cannot acquire new beh

Re: [Pharo-users] Trait composition on runtime

2013-08-23 Thread Norbert Hartl
Am 23.08.2013 um 09:34 schrieb Stéphane Ducasse : >> >>> Hi Norbert, >>> >>> It sounds like you want something like talents Talents >>> http://scg.unibe.ch/research/bifrost/talents. >>> However, there is no running version on pharo 3.0 yet. >>> >>> I am not aware of work on object-specific tr

Re: [Pharo-users] Trait composition on runtime

2013-08-23 Thread Stéphane Ducasse
IDE is support key as Johan mentioned. Then the question is what is the correct granularity that will suit future users of a trait. Stef

Re: [Pharo-users] Trait composition on runtime

2013-08-23 Thread Stéphane Ducasse
> >> Hi Norbert, >> >> It sounds like you want something like talents Talents >> http://scg.unibe.ch/research/bifrost/talents. >> However, there is no running version on pharo 3.0 yet. >> >> I am not aware of work on object-specific traits, I could be wrong though. >> > you might be right. The

Re: [Pharo-users] Trait composition on runtime

2013-08-22 Thread Norbert Hartl
Am 22.08.2013 um 22:03 schrieb Juraj Kubelka : > > El 22-08-2013, a las 14:12, Stéphane Ducasse > escribió: > > Does pharo support runtime trait composition or does it only work on > class definition time. I mean something like > > anObject addTrait: MySpecialCapabilit

Re: [Pharo-users] Trait composition on runtime

2013-08-22 Thread Norbert Hartl
Am 22.08.2013 um 20:12 schrieb Stéphane Ducasse : >>> 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 :) >>>

Re: [Pharo-users] Trait composition on runtime

2013-08-22 Thread Norbert Hartl
Am 22.08.2013 um 20:29 schrieb Johan Fabry : > > Norbert, do you want to be able to programmatically add and remove traits at > runtime? I wrote a small utility for that a while ago that still works OK > (All tests are still green in 2.0). See > http://www.squeaksource.com/TraitsApplication.h

Re: [Pharo-users] Trait composition on runtime

2013-08-22 Thread Norbert Hartl
Jorge, Am 22.08.2013 um 15:28 schrieb Jorge Ressia : > Hi Norbert, > > It sounds like you want something like talents Talents > http://scg.unibe.ch/research/bifrost/talents. > However, there is no running version on pharo 3.0 yet. > > I am not aware of work on object-specific traits, I could b

Re: [Pharo-users] Trait composition on runtime

2013-08-22 Thread Johan Fabry
Define 'widely used' and 'is it necessary' ;-) I would say, from the point of view of an Aspects guy (me), that a noticeable influence in the acceptance of the language AspectJ is that they have an acceptable level of IDE support. And there is no escaping the fact that sometimes the decomposit

Re: [Pharo-users] Trait composition on runtime

2013-08-22 Thread Juraj Kubelka
Is there any "more complex" system which is widely used? I am interested if it has a sense to spend time on researching something better than single-inheritance OOP, traits, etc. Because "Worse is Better" is maybe the point. For example I found easier to improve (optimize) an existing applicat

Re: [Pharo-users] Trait composition on runtime

2013-08-22 Thread Johan Fabry
I think that indeed you touch on 2 important cultural issues, first the entire "Worse is Better" discussion (started by Richard Gabriel), and second that IDE support is key for getting more advanced forms of modularity in use. In my experience, sadly, Traits support in Pharo has been less than

Re: [Pharo-users] Trait composition on runtime

2013-08-22 Thread Juraj Kubelka
El 22-08-2013, a las 14:12, Stéphane Ducasse 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

Re: [Pharo-users] Trait composition on runtime

2013-08-22 Thread Johan Fabry
Norbert, do you want to be able to programmatically add and remove traits at runtime? I wrote a small utility for that a while ago that still works OK (All tests are still green in 2.0). See http://www.squeaksource.com/TraitsApplication.html Hope this helps. On Aug 22, 2013, at 1:19 PM, Norb

Re: [Pharo-users] Trait composition on runtime

2013-08-22 Thread Stéphane Ducasse
>> >>> 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 abo

Re: [Pharo-users] Trait composition on runtime

2013-08-22 Thread Norbert Hartl
Am 22.08.2013 um 16:25 schrieb Stéphane Ducasse : > > On Aug 22, 2013, at 3:23 PM, Norbert Hartl wrote: > >> Does pharo support runtime trait composition or does it only work on class >> definition time. I mean something like >> >> anObject addTrait: MySpecialCapability >> anObject removeTr

Re: [Pharo-users] Trait composition on runtime

2013-08-22 Thread Stéphane Ducasse
On Aug 22, 2013, at 3:23 PM, Norbert Hartl wrote: > 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 :) > > Norb

Re: [Pharo-users] Trait composition on runtime

2013-08-22 Thread Sebastian Tleye
Hi Norbert, You can do anObject setTraitComposition: aTraitComposition but only works for behavior objects 2013/8/22 Jorge Ressia > Hi Norbert, > > It sounds like you want something like talents Talents > http://scg.unibe.ch/research/bifrost/talents. > However, there is no running version on p

Re: [Pharo-users] Trait composition on runtime

2013-08-22 Thread Jorge Ressia
Hi Norbert, It sounds like you want something like talents Talents http://scg.unibe.ch/research/bifrost/talents. However, there is no running version on pharo 3.0 yet. I am not aware of work on object-specific traits, I could be wrong though. Cheers, On Thu, Aug 22, 2013 at 3:23 PM, Norbert Ha

[Pharo-users] Trait composition on runtime

2013-08-22 Thread Norbert Hartl
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 Norbert