On Feb 8, 2008 4:32 PM, Gary Gregory <[EMAIL PROTECTED]> wrote: > > From: Jukka Zitting [mailto:[EMAIL PROTECTED] > > Sent: Friday, February 08, 2008 8:24 AM > > To: Jakarta Commons Developers List > > Subject: Re: [io] 2.0 Moving to minimum of JDK 1.5 > > > > Hi, > > > > On Feb 8, 2008 5:24 PM, James Carman <[EMAIL PROTECTED]> wrote: > > > On 2/8/08, Jukka Zitting <[EMAIL PROTECTED]> wrote: > > > > If there's a class or interface, say o.a.c.io.SomeClass, that needs to > > > > be changed extensively to match "Java 5 style", then I'd name the > > > > modified version o.a.c.io.SomeClass2 (or something better if > > > > possible). > > > > > > I don't know about that. Then, we could potentially have classes like > > > SomeClass, SomeClass2, SomeClass3, etc. running around. Also, it > > > wouldn't be as easy to upgrade to a new version. If it were done the > > > other way, folks could just do a find/replace on the package name in > > > their code and be done. > > > > Why I should need the find/replace in the first place? A find/replace > > won't help with any fundamental API incompatibilities that would > > trigger the creation of SomeClass2. > > > > You'd only need to upgrade to SomeClass2 if you actually need the new > > functionality, otherwise you could just keep using the old API when > > upgrading from 1.x to 2.x. With the o.a.c.io2 proposal everybody would > > need to update their code when upgrading even if no part of the API > > they touch has changed. > > I do not think this last paragraph is correct. The io2 package is not only > free to introduce generics in the API, it is also free to use Java 5 features > in its internal implementation. This gives us the freedom to use all Java 5 > features in io2 while keeping the API or most of it the same. So if you are > using io2, you must use Java 5. If you have a 3rd party library that depends > on io (v1.x), then you need the io package around too.
But why does changing to use generics make it incompatible - since java erases generics? So far I believe all the JDK 1.5 changes I've done (including generics) are backward compatible - clirr thinks so except when I changed the LineIterator next() method to return a String rather than Object - but I think thats an error on clirrs part. Niall > So, in short, you need all of io v2 in io2 and all of io v1 in io. This > allows for an application to depend on both and allows io2 to use all of Java > 5 internally and in presenting its external API. > Gary > > > > > > BR, > > > > Jukka Zitting --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]