lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Hargrave" <>
Subject Re: Similarity byteToFloat() and and floatToByte()
Date Wed, 02 Jul 2003 05:27:06 GMT
Forgive me - I come from a Smalltalk background :-) The thought of an uninheritable class is
hard to accept.

One class in particular I would like to see opened up is "Hits". I'd like to modify the getDocs
method and add a few more fields (i.e, term positions). Doing this with inheritance is the
cleanest way.


>>> 06/30/03 11:43 AM >>>
Jim Hargrave wrote:
> This brings up a general question. Why all the 'final' classes? Is it a performance trick?
Personally I would trade a little performance to have all the classes open to inheritance.
More liberal use of public and protected would also be appreciated.

Final declarations made some things faster in old versions of the java 
compiler, but that is no longer the case.

On the other hand, we can't just remove all final declarations, nor make 
everything public: many things are private and/or final because they are 
not designed to be subclassed or overridden.  Once something is public 
its implementation cannot be as easily changed without breaking 
back-compatibility, slowing development.  So we should be careful to 
only make public things whose API we don't expect to change.

If you have particular methods and classes which you believe are overly 
protected, then please make a specific proposal.


To unsubscribe, e-mail:
For additional commands, e-mail:

This message may contain confidential information, and is intended only for the use of the
individual(s) to whom it is addressed.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message