Runtime Traits?
Mike
me at mikehogan.net
Mon May 30 19:18:38 UTC 2005
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.
I'd just like to know what others think of traits being a compile
time thing. And whether there might be value in mixing them in at
runtime. I am also dimly aware of the potential for there being
little different between compile time and runtime in smalltalk.
Thanks for listening.
Mike.
More information about the Squeak-dev
mailing list
|