lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@lucene.com>
Subject Re: Similarity byteToFloat() and and floatToByte()
Date Mon, 30 Jun 2003 17:42:15 GMT
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


Mime
View raw message