Map and arrays
Jonathan M Davis
jmdavisProg at gmx.com
Sun Nov 28 22:30:44 PST 2010
On Sunday 28 November 2010 21:49:19 Tom wrote:
> El 29/11/2010 01:58, Jonathan M Davis escribió:
> > On Sunday 28 November 2010 19:53:36 Tom wrote:
> >> I'm not criticizing ddoc color or fonts. I mean, for example, in the
> >> index of symbols at the beginning of every ddoc page, there are
> >> functions, constants, classes, and templates, all mixed and each next to
> >> the other. It doesn't even have an alphabetic ordering. It was difficult
> >> to me at first sight to understand where to look for things. Maybe it's
> >> not that important as bugfixes, but when new programmers get close to D2
> >> (even old D1 fans, like myself), I'm afraid that more than one could
> >> feel some frustration.
> > Oh, I agree, as do many others. But someone has to come up with a better
> > way of doing it and be motivated enough to figure out what has to be
> > done with regards to macros and css and whatever else about generating
> > the html files needs to be tweaked. Some folks have done work on it, but
> > no one has presented a better solution yet. And the main devs for dmd,
> > druntime, and Phobos are generally working on code fixes rather than
> > documentation fixes. I'm sure that it'll be improved eventually, but
> > someone has to want to do it, get it done, and get the main devs to
> > approve it. That hasn't happened yet.
> > - Jonathan M Davis
> I wish I had time to give it a try :(
> Maybe in a not so remote future...
> I really appreciate the effort Walter and Andrei (and others) are doing
> to lift up the language, though.
> Changing the subject (more or less), when I was having this little Map
> annoyance I wondered myself, does D2 have a collection library (mainly
> supporting Set<T> etc.)?
Containers/Collections are in std.container. It is a bit sparse at the moment
though. It only has SList (singly-linked list), Array (the equivalent of a C++
vector), and BinaryHeap. A RedBlackTree is in the works and should be included
soon (which will give you a container which can act like a set), but it hasn't
made it in yet. I'm not sure why, since supposedly the implementation is done.
Eventually, it should have the full array of containers which it makes sense to
have in a standard library, but it's one of the newer modules and so is a bit on
the sparse side.
- Jonathan M Davis
More information about the Digitalmars-d-learn