On 04/14/2010 12:29 PM, Marvin Humphrey wrote:
On Wed, Apr 14, 2010 at 08:30:14AM -0400, Grant Ingersoll wrote:
The thing I keep going back to is that somehow Lucene has managed for years
(and I mean lots of years) w/o stuff like Version and all this massive back
compatibility checking.
Non-constant global variables are an anti-pattern.
I think clinging to such rules in the face of all situations is an
anti-pattern :) I take it as a rule of thumb.
In regards to this discussion:
I agree that the Version stuff is a bit of a mess. I also agree that
many users will want to just use one version across their app that is
easy to change.
I disagree that we should allow that behavior by just using a
constructor without the Version param - or that you would be forced to
set the static Version setting by trying to run your app and seeing an
exception happen. That is all a bit ugly.
Too many users will not understand Version or care to if they see they
can skip passing it. IMO, you should have to specify that you are
looking for this behavior. In which case, why not just specify it using
the version param itself :) E.g. if a user wants to get this kind of
static behavior, they can just choose to do it on their own, and pass
their *own* static Version constant to all the constructors.
I don't think we need to go through this hassle and introduce a less
than ideal solution just so that users can pass one less param -
especially when I think you should explicitly choose this behavior
rather than get it by ignoring the Version param.
--
- Mark
http://www.lucidimagination.com
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org