www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Two Tango container package

reply Sam Hu <samhu.samhu gmail.com> writes:
I was wondering why there are 2 container package under tango.util.collection
,tango.util.container which some of the libarary are the same,say
HashSet,HashMap which just make a bit confuse?

Thanks.
Jan 02 2009
parent reply "Tim M" <a b.com> writes:
On Sat, 03 Jan 2009 17:10:44 +1300, Sam Hu <samhu.samhu gmail.com> wrote:

 I was wondering why there are 2 container package under  
 tango.util.collection ,tango.util.container which some of the libarary  
 are the same,say HashSet,HashMap which just make a bit confuse?

 Thanks.
Container is the newer one. Collection is not going to be removed so suddenly (deprecated). See here http://dsource.org/projects/tango/forums/topic/523
Jan 02 2009
parent reply Lars Ivar Igesund <larsivar igesund.net> writes:
Tim M wrote:

 On Sat, 03 Jan 2009 17:10:44 +1300, Sam Hu <samhu.samhu gmail.com> wrote:
 
 I was wondering why there are 2 container package under
 tango.util.collection ,tango.util.container which some of the libarary
 are the same,say HashSet,HashMap which just make a bit confuse?

 Thanks.
Container is the newer one. Collection is not going to be removed so suddenly (deprecated). See here http://dsource.org/projects/tango/forums/topic/523
It (tango.util.collection) is deprecated yes, but will not stay for long. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Jan 03 2009
parent reply Sam Hu <samhu.samhu gmail.com> writes:
OK,so which one is equivelant to ArrayBag in the container module?I found
Vector is not the same as c++ std::vector<>does,while ArrayBag in the
collection module looks more like.If the collection module deprecates in the
future,which one in the container module will act as ArrayBag?

Thanks.
Sam
Jan 04 2009
parent Lars Ivar Igesund <larsivar igesund.net> writes:
Sam Hu wrote:

 OK,so which one is equivelant to ArrayBag in the container module?I found
 Vector is not the same as c++ std::vector<>does,while ArrayBag in the
 collection module looks more like.If the collection module deprecates in
 the future,which one in the container module will act as ArrayBag?
That particular container have been prioritized down since arrays in D are fairly nice to use in any case - so an implementation may have to rely on a contribution. or at least a wishlist ticket. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Jan 06 2009