OpenBLCMM
OpenBLCMM copied to clipboard
Pass around object refs for things like GlobalLogger + Options, rather than relying on static instances
OpenBLCMM does a lot of static references, using stuff like Options.INSTANCE
. GlobalLogger
is basically entirely static, etc. I'd kind of prefer passing around object references instead, though, so that dependencies between all that stuff is more clear. The static/INSTANCE
thing has bitten me a number of times while working on OpenBLCMM, too -- for instance, I'd wanted to be able to import original-BLCMM preferences on a first-time OpenBLCMM run, but the Options
class really wanted to be the only instance that there was, so a lot of that had to get tweaked to support it.
Getting rid of that kind of thing altogether might be more trouble than it's worth, so we'll have to see. It's undeniably useful to be able to just call Options.INSTANCE
or GlobalLogger
from Literally Anywhere and having it Do The Right Thing.