You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Stephen Colebourne <sc...@btopenworld.com> on 2003/01/08 01:18:21 UTC
[collections] Collections sub-packages
Just a thought, but would it be sensible to reorganise [collections] into
sub-packages based on collection type?
o.a.c.collections.collection
o.a.c.collections.set
o.a.c.collections.list
o.a.c.collections.buffer
o.a.c.collections.map
The main package does seem rather large.
Or is this too much change now?
Stephen
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [collections] Collections sub-packages
Posted by Rich Dougherty <ri...@rd.gen.nz>.
> Just a thought, but would it be sensible to reorganise [collections] into
> sub-packages based on collection type?
>
> o.a.c.collections.collection
> o.a.c.collections.set
> o.a.c.collections.list
> o.a.c.collections.buffer
> o.a.c.collections.map
>
> The main package does seem rather large.
I think this is a good idea. I have been playing around with some
changes like this on my private branch. It definitely makes it a lot
easier to find your way around the code.
> Or is this too much change now?
A change like this would definitely inconvenience users, but I think it
is would be fine if it is planned carefully. For example, code in the
old position could be deprecated for version 3 and removed in version 4.
Rich
Re: [collections] Collections sub-packages
Posted by Stephen Colebourne <sc...@btopenworld.com>.
From: "Rodney Waldhoff" <rw...@apache.org>
> If my example had been UniqueList instead of OrderedSet, would your answer
> would have been different?
Yes, by name that is a List (although the implementation is more Set
like....)
Other categorisations could be
maps
collections
(as they are incompatable)
or
maps
buffers
bags
(other collections stay in main package)
All just ideas...
Stephen
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [collections] Collections sub-packages
Posted by Rodney Waldhoff <rw...@apache.org>.
On Wed, 8 Jan 2003, Stephen Colebourne wrote:
> > Besides, these packages aren't really mutually exclusive. For instance,
> > Set and List both implement Collection, and where would something like an
> > OrderedSet (a List that doesn't allow duplicates, implementing Set) go?
>
> I would say that this goes in Set, as per the classname (its intent if you
> like).
If my example had been UniqueList instead of OrderedSet, would your answer
would have been different?
> However the change would be considerable to our users.
>
> I am concerned about the package size, but maybe its not that important...
>
> Stephen
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [collections] Collections sub-packages
Posted by Stephen Colebourne <sc...@btopenworld.com>.
> Besides, these packages aren't really mutually exclusive. For instance,
> Set and List both implement Collection, and where would something like an
> OrderedSet (a List that doesn't allow duplicates, implementing Set) go?
I would say that this goes in Set, as per the classname (its intent if you
like). However the change would be considerable to our users.
I am concerned about the package size, but maybe its not that important...
Stephen
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [collections] Collections sub-packages
Posted by Rodney Waldhoff <rw...@apache.org>.
On Wed, 8 Jan 2003, Stephen Colebourne wrote:
> Just a thought, but would it be sensible to reorganise [collections] into
> sub-packages based on collection type?
>
> o.a.c.collections.collection
> o.a.c.collections.set
> o.a.c.collections.list
> o.a.c.collections.buffer
> o.a.c.collections.map
>
> The main package does seem rather large.
>
> Or is this too much change now?
In my opinion, yes.
Besides, these packages aren't really mutually exclusive. For instance,
Set and List both implement Collection, and where would something like an
OrderedSet (a List that doesn't allow duplicates, implementing Set) go?
- Rod
> Stephen
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [collections] Collections sub-packages
Posted by Morgan Delagrange <md...@yahoo.com>.
--- Rich Dougherty <ri...@rd.gen.nz> wrote:
> > -1.
> >
> > Backward compatibility is the main concern.
> [collection] is widely used. If
> > the package is reorged, existing users (including
> Struts and Tomcat?) can't
> > upgrade to new releases without substantial
> changes.
> >
> > Besides, the [collection] package is not that big,
> compared to say java.util.*.
>
> Mind you, many people would consider that java.util
> is pretty badly
> organised.
>
> I agree that the inconvenience to users needs to be
> carefully weighed
> up. Sun has made the decision to keep java.util
> together instead of
> splitting it into java.collections, java.time, etc.
> I think that
> decision was a good one, but that doesn't
> necessarily make it a good
> design. :-)
>
> Rich
I'm also -1 to repackaging unless there is a more
concrete benefit. Collections is widely adopted
indeed:
http://cvs.apache.org/builds/gump/latest/xref.html
Inconveniencing users by repackaging so they won't be
inconvenienced by our packaging. Does not compute.
It doesn't even look that confusing to my eyes:
http://nagoya.apache.org/gump/javadoc/jakarta-commons/collections/dist/docs/api/org/apache/commons/collections/package-summary.html#package_description
- Morgan
=====
Morgan Delagrange
http://jakarta.apache.org/taglibs
http://jakarta.apache.org/commons
http://axion.tigris.org
http://jakarta.apache.org/watchdog
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [collections] Collections sub-packages
Posted by Rich Dougherty <ri...@rd.gen.nz>.
> -1.
>
> Backward compatibility is the main concern. [collection] is widely used. If
> the package is reorged, existing users (including Struts and Tomcat?) can't
> upgrade to new releases without substantial changes.
>
> Besides, the [collection] package is not that big, compared to say java.util.*.
Mind you, many people would consider that java.util is pretty badly
organised.
I agree that the inconvenience to users needs to be carefully weighed
up. Sun has made the decision to keep java.util together instead of
splitting it into java.collections, java.time, etc. I think that
decision was a good one, but that doesn't necessarily make it a good
design. :-)
Rich
Re: [collections] Collections sub-packages
Posted by Henri Yandell <ba...@generationjava.com>.
On Wed, 8 Jan 2003, John Yu wrote:
>
> -1.
>
> Backward compatibility is the main concern. [collection] is widely used. If
> the package is reorged, existing users (including Struts and Tomcat?) can't
> upgrade to new releases without substantial changes.
>
> Besides, the [collection] package is not that big, compared to say
> java.util.*.
I'm -1 to the concept that backwards compatibility is the main concern.
The main concern should be the quality of the library.
However, I'm -1 to the reorganising proposal in general as I don't think
there is a naming solution that will be either a) amenable to a large
majority and b) right first time.
However, Collections is large and obtuse. The solution is better
documentation I think. One such example would be a tutorial like section
to the website with examples on using each class.
Hen
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [collections] Collections sub-packages
Posted by John Yu <jo...@scioworks.com>.
-1.
Backward compatibility is the main concern. [collection] is widely used. If
the package is reorged, existing users (including Struts and Tomcat?) can't
upgrade to new releases without substantial changes.
Besides, the [collection] package is not that big, compared to say java.util.*.
At 08:18 am 08-01-2003, you wrote:
>Just a thought, but would it be sensible to reorganise [collections] into
>sub-packages based on collection type?
>
>o.a.c.collections.collection
>o.a.c.collections.set
>o.a.c.collections.list
>o.a.c.collections.buffer
>o.a.c.collections.map
>
>The main package does seem rather large.
>
>Or is this too much change now?
>
>Stephen
--
John Yu Scioworks Technologies
e: john@scioworks.com w: +(65) 873 5989
w: http://www.scioworks.com m: +(65) 9782 9610
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>