On Mon, Oct 24, 2011 at 9:52 AM, Grant Ingersoll <gsing...@apache.org> wrote:
> Hi,
>
> I was perusing trunk code on the way back from Eurocon and noticed the new 
> FieldType stuff has some interfaces in it.  In the past we've tried to stick 
> to interfaces for only simple ones (i.e. one or two methods that aren't 
> likely to change at all) and instead used abstract classes for bigger classes 
> that may be subject to change more often.

I think its good you brought this up Grant.

I wanted to mention this: as far as interfaces versus abstract
classes, in my opinion Lucene was under a false sense of security
before thinking that abstract classes actually solve these back compat
problems.
In fact they can create serious problems like
https://issues.apache.org/jira/browse/LUCENE-2828. In other words, if
someone writes a delegator over an abstract class, its asking for
trouble.
On the other hand, delegators over interfaces are safe because they
(and we) get a compile-time break for the new methods.

-- 
lucidimagination.com

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

Reply via email to