On Oct 24, 2011, at 9:56 AM, Robert Muir wrote: > 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.
Good point. Basically, going down this line, are we saying that we would still allow new methods on minor versions on Interfaces? My personal take is that if we do, we primarily just need to communicate it ahead of time. Ideally, at least one release ahead, but maybe it is just an email. We just want to avoid surprises for people where possible. -Grant --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org