www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Phobos + DCollections

reply William Bashir <williambashir mailinator.com> writes:
Why not include most of DCollections in Phobos? std.container will surely
benefit from having a rbtree, list and other data structures and implementing
new versions for just for Phobos seems like NIH.

Thanks
Sep 08 2010
next sibling parent bearophile <bearophileHUGS lycos.com> writes:
William Bashir:

 Why not include most of DCollections in Phobos? std.container will surely
 benefit from having a rbtree, list and other data structures and implementing
 new versions for just for Phobos seems like NIH.

Those data structures will be added. But Andrei wants to organize them in a different way. Bye, bearophile
Sep 08 2010
prev sibling parent "Steven Schveighoffer" <schveiguy yahoo.com> writes:
On Wed, 08 Sep 2010 13:52:11 -0400, William Bashir  
<williambashir mailinator.com> wrote:

 Why not include most of DCollections in Phobos? std.container will surely
 benefit from having a rbtree, list and other data structures and  
 implementing
 new versions for just for Phobos seems like NIH.

FWIW, dcollections' RBTree is going to be in phobos std.container. I submitted a std.container-ified to Andrei, it lacks documentation and full unit tests, but I copied almost exactly my RBNode that implements the algorithm. As far as the other things, they are pretty rote (hash tables, arrays, linked lists), so NIH doesn't really apply. The RBTree took a long time to get right (started with pascal-like pseudocode from my algorithms book). -Steve
Sep 08 2010