I think global objects are best avoided; they reduce flexibility. The
--internal-plan-file and --internal-previous-portfolio-plans options are obvious
hacks, too, and would more naturally be part of the search algorithm options in
the same way that the passed-in bounds are. One of the reasons they currently
aren't is that the option parser doesn't support string arguments.
If we ever later want to allow specifying multiple searches, it would make sense
for them to operate on different tasks and write to different sources. More
generally, I think the option syntax should eventually be unified further so
that we use the same sort of mechanism for everything. Currently we have a bit
of a mix between the component-based option parser and traditional --option
style options. I think it would make sense for the latter ones to eventually go
away, except perhaps for things like --help with are general conventions.
|