I wonder why do we even have to deprecate ...
A method like public void function( List<Term> list ) changes nothing in
terms of API. When people will move to 3.0, they'll have to change their JDK
anyway to 5 (if they haven't already done so). Which means they had code
like:
function(List), and where List was not defined as generics. But they'll get
a warning anyway by the compiler, when they define List, that it's not safe
to create a list w/o defining its type.

I think that when you move to 5 you have to change a lot of your code
anyway, so simply changing the Lucene API will not create too much of a
hassle for existing applications.

Personally I'd hate to find out I have to change my entire application
because method/classes names were changed.

Shai

On Fri, Dec 12, 2008 at 1:44 PM, Michael McCandless <
luc...@mikemccandless.com> wrote:

>
> Ryan McKinley wrote:
>
>
>> On Dec 12, 2008, at 5:18 AM, Michael McCandless wrote:
>>
>>
>>> Taking this to java-dev (off Jira)...
>>>
>>> Mark Miller (Jira) wrote:
>>>
>>> > I thought there were some that wanted to change some of the API to java
>>> > 5 for the 3.0 release, cause I thought back compat was less restricted
>>> > 2-3. I guess mabye that won't end up happening, if it was going to, it
>>> > seems we'd want to deprecate what will be changed in 2.9.
>>>
>>> I could easily be confused on this... but I thought 3.0 is the first
>>> release that's allowed to include Java 1.5 only APIs (eg generics).
>>>
>>> Meaning, we could in theory intro APIs with generics with 3.0,
>>> deprecating the non-generics versions, and then 4.0 (sounds insanely
>>> far away!) would be the first release that could remove the deprecated
>>> non-generics versions?
>>>
>>> That said, I think the "plan" is to release 2.9 soonish (early next
>>> year?), and then fairly quickly turnaround a 3.0 that doesn't have too
>>> many changes except the removal of the deprecated (in 2.9) APIs.  Ie
>>> in practice it won't be until 3.1 when we would intro new
>>> (generics-based) APIs.
>>>
>>>
>>
>> What are examples of the deprecated non-generic APIs?
>>
>> My understanding would be that in 2.9 we have:
>> public void function( List list );
>> and in 3.0
>> public void function( List<Term> list );
>>
>> How do you keep both functions around?
>>
>
> We'd have to change the name?  Or deprecate the whole class containing
> these methods (if there are lots of methods to deprecate)?  Definitely
> something of a hassle.
>
> Mike
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-dev-h...@lucene.apache.org
>
>

Reply via email to