Runtime Traits?

Brian Rice water at tunes.org
Thu Jun 2 00:34:43 UTC 2005


On May 30, 2005, at 1:07 PM, stéphane ducasse wrote:

> Hi mike
>> Hi all, please forgive me if this betrays a terrible level of
>> ignorance on my part, but I think there is benefit to be had in
>> runtime traits injection, to coin a phrase.  I am writing software
>> to enable back testing of stock trading strategies.  Each strategy
>> makes use of a selection of technical indicators, and each
>> strategies combination of stratgies is usually different.  I am
>> writing the technical indicators as traits, which layer over a
>> simple Tick class that has open, high, low, close and volume
>> accessors to represent the stock data.  I would prefer to inject
>> the relevant traits as required by the individual strategy,
>> instead of rolling all the traits into one class.
>>
>
> Which traits are you talking? Self traits or Nathanael's one?

Slate right now implements a reasonable subset of the latter with the  
former, and so can shift things around at run-time or on a per-object  
basis, but that is a matter of necessity (and we are interested in  
wiping out the basis on the former while still having most of its  
power).

I am sure that mike means the latter, though, since the former aren't  
known here.




More information about the Squeak-dev mailing list