that's what I was proposing in my posts, so we were were talking about the same thing ...
reinventing the wheel everytime is not the best way to use our time I think, so I prefer to focus on "new" creative ideas rather than creative ways to implement "old" ideas ... and I often end up spending most of my time in adapting to AFL very simple ideas which could be coded in few lines in other languages/environments but being practical I know this is a good framework , it would be perfect with full OO, especially on the long term code could be much more reusable and understandable Ly --- In [email protected], "tuzo_wilson" <[EMAIL PROTECTED]> wrote: > > -- In [email protected], "loveyourenemynow" > <loveyourenemynow@> wrote: > > > I need to optimize on the functions, so their definition should change > > for different optimization parameter, and since I cannot define them > > within if statements I don't see how I could achive whar I want using > > your idea. > > I think Graham mentioned to parameterize your functions so that within > the function you can have a totally different implementation. e.g. > > > function Test(myParam, myClose) > { > if (myParam == 0) > { > result = Ref(myClose, -1); > } > else > { > result = StDev(myClose, 10); > } > > return result; > } > > > I think you should focus on achieving the functionality you want within > the technology constraints presented instead of focusing on polymorphism > (or other design patterns). > > Tuzo >
