You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Jim Hargrave <ha...@ldschurch.org> on 2003/07/02 07:27:06 UTC

Re: Similarity byteToFloat() and and floatToByte()

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.

Jim


>>> cutting@lucene.com 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.

Doug


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org




------------------------------------------------------------------------------
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: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org