containers/collections for phobos

Jonathan M Davis jmdavisProg at gmail.com
Thu Dec 17 21:01:40 PST 2009


I was just wondering what the current plans were for containers/collections 
in phobos. Right now, there aren't any. It is, in my opinion at least, by 
far the largest drawback to phobos. Certainly, I think that that's the 
greatest advantage that tango has over phobos. Container classes are one of 
the first things that I look for in a standard library, and in that respect, 
phobos is sorely lacking.

Phobos has some great stuff in it. It even has highly innovative stuff like 
ranges which would be fantastic with containers/collections, but it lacks 
the container classes themselves. Granted, D arrays are absolutely fantastic 
(by far the best arrays that I've ever seen), but even with them being 
resizable and being able to be used as hash tables, they're no replacement 
for vectors, linked list, sorted maps, sets (sorted or otherwise), etc.

Are there any plans to add container/collection classes to phobos? I assume 
that they haven't been written yet because there have been higher 
priorities, but especially if we're looking to have D2 completed sometime in 
the near future, I would think that we'd want containers to be part of the 
standard library. Certainly, it's a major caveat for anyone looking to use 
D. At the moment, you either have to use 3rd party libraries or roll your 
own, and that's not exactly the ideal situation for something as basic and 
essential as container classes.

- Jonathan M Davis


P.S. I must say though, that ranges greatly simplify the writing of 
container classes. Most of the difficulties that I've had in writing my own 
have been in putting together good iterator implementations and everything 
that goes with that. Ranges could really set D containers/collections apart. 
They're so much like iterators, and yet so much better.



More information about the Digitalmars-d mailing list