On Wed, May 20, 2009 at 11:57 AM, Yonik Seeley <yo...@lucidimagination.com> wrote: > On Wed, May 20, 2009 at 11:46 AM, Mark Miller <markrmil...@gmail.com> wrote: >> Marvin Humphrey wrote: >>> >>> Yeesh, that's evil. :( >>> >>> It will be sweet, sweet justice if one of your own projects gets infected >>> by >>> the kind of action-at-a-distance bug you're so blithely unconcerned about >> >> Heh. Thats a bit over the top. It is evil stuff, but its much less evil in >> this very contained instance than the general case. Much less. >> >> But still a bit evil with the potential to grow. I'm not anymore of a fan of >> passing a config to each class though. But I guess from a design point >> of view, it does feel a little less evil. > > Agree. > > But passing settings around doesn't solve the problem. Example: New > settings may be chosen by an application for an IndexSearcher that's > incompatible with a custom older Query/Weight/Scorer. There's really > no getting around that problem. I think the static helps solve > drop-in compat for a complete working application. Good components > should only be checking the static, not setting it.
Also, this static setting simply tells Lucene how to default settings. A component/app can still be explicit when creating classes. EG when opening an IndexReader, if one always passes in the readOnly arg then the static "actsAsVersion" would not be used. Mike --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org