You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Kris Nuttycombe <Kr...@noaa.gov> on 2006/10/20 18:36:12 UTC

[collections] Generifying Collections

Speaking of porting to collections to generics, I have a bit of time 
available to contribute to this effort. Could we at least create a 
generics branch in SVN to get the ball rolling? This topic has been 
bounced around for a long time, but the process needs to start at some 
point. I realize that collections needs to be refactored into some 
smaller projects, but I'm not convinced that the two tasks need to 
necessarily be undertaken simultaneously. It may in fact be simpler to 
generify the code in its current architecture since this will involve 
less disruption to the unit tests.

Kris

Stephen Colebourne wrote:
> Hi,
> It would be useful to attach anything to a JIRA call, as that is an easier worklog than email.
>
> The biggest issue that I can see with this is that [collections] as a project is currently at the 'full' point, and needs refactoring into smaller units. This should probably be done as part of moving collections to JDK1.5.
>
> Unfortunately, [collections] has little development time available, so just porting to generics is a big enough concept, even before considering a new collection like Trie.
>
> There may be another committer willing to volunteer time to this of course...
>
> Stephen
>
>
> ----- Original Message ----
> From: Sam Berlin <sb...@gmail.com>
> To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> Cc: Roger Kapsi <ro...@kapsi.de>
> Sent: Wednesday, 20 September, 2006 12:42:12 AM
> Subject: Contributing to Collections
>
> Hi Folks,
>
> I sent an email last week about contributing a Patricia tree to the Commons
> Collections project, but haven't heard back.  The project is fully
> voluntary, so I understand that responses may take a long time.  I'd like to
> make sure that I sent the offer to the correct place, though.  Is there some
> other venue I should be looking at for contributing code?  Should I be doing
> this through JIRA?
>
> To recap last week's email, Roger Kapsi & I have developed a Patricia tree
> that fits the Map & SortedMap interfaces (and can easily fit the upcoming
> Java 1.6 NavigableMap), and we'd like to offer it for inclusion in
> commons-collection.  It's currently written for Java 1.5's generics and
> licensed under the GPL, but we can easily remove the generics if required
> and should likely be able to change the license if necessary.
>
> Thanks very much,
>  Sam
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [collections] Generifying Collections

Posted by Henri Yandell <fl...@gmail.com>.
Whatever you want to do is good, but I'd like to see the first bit be
an analysis of the various forks that have happened in terms of 1.5
versions of collections. There's stuff out there that wanted to get
involved, now that we're thinking of moving they might be interested
and have valuable code and/or ideas.

I'm not convinced on splitting up collections yet; simply having a big
jar isn't enough of a reason for me.

Hen

On 10/20/06, Kris Nuttycombe <Kr...@noaa.gov> wrote:
> Speaking of porting to collections to generics, I have a bit of time
> available to contribute to this effort. Could we at least create a
> generics branch in SVN to get the ball rolling? This topic has been
> bounced around for a long time, but the process needs to start at some
> point. I realize that collections needs to be refactored into some
> smaller projects, but I'm not convinced that the two tasks need to
> necessarily be undertaken simultaneously. It may in fact be simpler to
> generify the code in its current architecture since this will involve
> less disruption to the unit tests.
>
> Kris
>
> Stephen Colebourne wrote:
> > Hi,
> > It would be useful to attach anything to a JIRA call, as that is an easier worklog than email.
> >
> > The biggest issue that I can see with this is that [collections] as a project is currently at the 'full' point, and needs refactoring into smaller units. This should probably be done as part of moving collections to JDK1.5.
> >
> > Unfortunately, [collections] has little development time available, so just porting to generics is a big enough concept, even before considering a new collection like Trie.
> >
> > There may be another committer willing to volunteer time to this of course...
> >
> > Stephen
> >
> >
> > ----- Original Message ----
> > From: Sam Berlin <sb...@gmail.com>
> > To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> > Cc: Roger Kapsi <ro...@kapsi.de>
> > Sent: Wednesday, 20 September, 2006 12:42:12 AM
> > Subject: Contributing to Collections
> >
> > Hi Folks,
> >
> > I sent an email last week about contributing a Patricia tree to the Commons
> > Collections project, but haven't heard back.  The project is fully
> > voluntary, so I understand that responses may take a long time.  I'd like to
> > make sure that I sent the offer to the correct place, though.  Is there some
> > other venue I should be looking at for contributing code?  Should I be doing
> > this through JIRA?
> >
> > To recap last week's email, Roger Kapsi & I have developed a Patricia tree
> > that fits the Map & SortedMap interfaces (and can easily fit the upcoming
> > Java 1.6 NavigableMap), and we'd like to offer it for inclusion in
> > commons-collection.  It's currently written for Java 1.5's generics and
> > licensed under the GPL, but we can easily remove the generics if required
> > and should likely be able to change the license if necessary.
> >
> > Thanks very much,
> >  Sam
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [collections] Generifying Collections

Posted by Mario Ivankovits <ma...@ops.co.at>.
> Perhaps you could expand on what the issues are with the JDK approach
> and why they're not desirable in Commons Collections - when I look at
> the differences for example between the generified and non-generified
> versions of java.util.List, I don't see the mess you describe.
Yes, this is something I had in mind too, just didn't bring it up as I
thought the team has good reasons to "fork" (or whatever), but maybe
there is no need at all to fork or package rename as long as we do not
use a new jdk5 api.

---
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [collections] Generifying Collections

Posted by Niall Pemberton <ni...@gmail.com>.
On 10/21/06, Stephen Colebourne <sc...@btopenworld.com> wrote:
> Henri Yandell wrote:
> > Why not just start a branch within Collections?
> >
> > I don't see why this is a new component, are we going to be advising
> > people to use Collections 3.x on JDK 1.5+ for any reasons other than
> > legacy or instability of our generified version?
> >
> > My view is to make a collections-generics branch in collections with a
> > view to it being Collections 4.0.
>
> Because commons isn't like other OSS projects. We can't go around
> changing our APIs freely, even between major versions. Its a simple case
> of us being at the bottom of the stack of jars. If we do change an API,
> any API then jar hell ensues because higher OSS projects will clash on
> their required versions of [collections].
>
> Thus, it has to be a new package, and this is best thought of as a new
> component.
>
> (Compare this with the JDK where they had to jump through ridiculous
> hoops to make generics fully backwards-compatible, and created a
> half-arsed mess in the process...)

>From a simplistic user perspective seems to me that the compatibility
achieved by the JDK is successful. I don't understand the intricacies
required to generify a library, but if we could do the same wouldn't
this be the best solution from a user perspective?

Perhaps you could expand on what the issues are with the JDK approach
and why they're not desirable in Commons Collections - when I look at
the differences for example between the generified and non-generified
versions of java.util.List, I don't see the mess you describe.

Also I don't understand the compatibilty issue - does the following,
for example, constitute a break in compatibility?

Going from:
    boolean add(object o)
to:
   boolean add(E e)

Apologies if these are stupid questions, but seems to me that if we
could retain backwards compatibility it would be the optimum solution
from a user perspective.

Niall

> Stephen

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [collections] Generifying Collections

Posted by Stephen Colebourne <sc...@btopenworld.com>.
We are just moving to JDK1.5 at work, and I too judge that the time is 
about right for this. I don't know how much time I'll be able to spend 
on it though. We'll have to see.

There is a clear difference of approach, however, with some factors being:
a) keep everything as close as possible to the current source (not 
always achievable)
b) split into 3-5 smaller components
c) same package name or different package name
d) same project [collections] or new project

Thus, I propose that this task is:
- started in the commons-sandbox
- uses a different package name [collgenerics]
- follows the current single jar/package structure
- no deprecated classes are ported

This allows coding to start quickly, but out of everyones way. It also 
then allows those of us (like me) who want to re-group the code to do so 
in a sandbox environment rather than commons-proper. Getting the 
promotion vote later should be no problem.

Kris, are you a committer @ apache?

Stephen


Kris Nuttycombe wrote:
> Speaking of porting to collections to generics, I have a bit of time 
> available to contribute to this effort. Could we at least create a 
> generics branch in SVN to get the ball rolling? This topic has been 
> bounced around for a long time, but the process needs to start at some 
> point. I realize that collections needs to be refactored into some 
> smaller projects, but I'm not convinced that the two tasks need to 
> necessarily be undertaken simultaneously. It may in fact be simpler to 
> generify the code in its current architecture since this will involve 
> less disruption to the unit tests.
> 
> Kris
> 
> Stephen Colebourne wrote:
> 
>> Hi,
>> It would be useful to attach anything to a JIRA call, as that is an 
>> easier worklog than email.
>>
>> The biggest issue that I can see with this is that [collections] as a 
>> project is currently at the 'full' point, and needs refactoring into 
>> smaller units. This should probably be done as part of moving 
>> collections to JDK1.5.
>>
>> Unfortunately, [collections] has little development time available, so 
>> just porting to generics is a big enough concept, even before 
>> considering a new collection like Trie.
>>
>> There may be another committer willing to volunteer time to this of 
>> course...
>>
>> Stephen
>>
>>
>> ----- Original Message ----
>> From: Sam Berlin <sb...@gmail.com>
>> To: Jakarta Commons Developers List <co...@jakarta.apache.org>
>> Cc: Roger Kapsi <ro...@kapsi.de>
>> Sent: Wednesday, 20 September, 2006 12:42:12 AM
>> Subject: Contributing to Collections
>>
>> Hi Folks,
>>
>> I sent an email last week about contributing a Patricia tree to the 
>> Commons
>> Collections project, but haven't heard back.  The project is fully
>> voluntary, so I understand that responses may take a long time.  I'd 
>> like to
>> make sure that I sent the offer to the correct place, though.  Is 
>> there some
>> other venue I should be looking at for contributing code?  Should I be 
>> doing
>> this through JIRA?
>>
>> To recap last week's email, Roger Kapsi & I have developed a Patricia 
>> tree
>> that fits the Map & SortedMap interfaces (and can easily fit the upcoming
>> Java 1.6 NavigableMap), and we'd like to offer it for inclusion in
>> commons-collection.  It's currently written for Java 1.5's generics and
>> licensed under the GPL, but we can easily remove the generics if required
>> and should likely be able to change the license if necessary.
>>
>> Thanks very much,
>>  Sam
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>>
>>
>>   
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org