Red black trees

John Demme me at teqdruid.com
Sat Oct 21 08:02:35 PDT 2006


Walter Bright wrote:

> Kyle Furlong wrote:
>> Walter Bright wrote:
>>> Red black trees are one of those basic collection types that should be
>>> available. Anyone want to write one for D for placement into Phobos?
>> 
>> Did anyone else read this and go "WTH"? Wouldn't it be better to
>> actually bless a community based standard library effort, than take
>> submissions piecemeal whenever you feel like it? Sure red black trees
>> are a basic collection that most people will need at some point, but why
>>  isn't it being made part of a larger templated collections portion of
>> the library?
>> 
>> I know for a fact that there is a group of people who would gladly take
>> up the standard library torch and run with it, people who would be
>> accountable to you and the community, with open source, documentation,
>> and a roadmap for development.
>> 
>> Its this kind of lack of vision which I think will retard D's evolution
>> into a production language, so that it forever remains at the level of
>> hobbyist hackery.
> 
> I would welcome it if you (or anyone else) makes a proposal for a set of
> to-be-implemented collection classes.

Walter, please take a look at mango.containers in Mango's SVN:
http://dsource.org/projects/mango/browser/trunk/mango/containers

It's meant to be a standard containers library similar to the Java
collections, but in more of a D style.  It uses mango.locks to implement
some thread-safe containers, so it's integrated into mango, but I feel it
will be appropriate as a generic library.  It's not done yet, however. 
There are still signifigant efforts yet to go in documentation, container
implementations, and algorithms (I've only got array quicksort and
reverse).

There's some demo code I use for unittesting at:
http://dsource.org/projects/mango/browser/trunk/mango/test/containers.d

I'd also like to mention (as long as I have your ear...err.. eyes) that most
of Mango would do well in the standard library, and I think you should
consider releasing Mango along with the compiler, as it is a very well
put-together and cohesive library.  It's got very efficient class-based IO
support with integrated encoding conversion, a SAX parser (beta- my work),
soon to have a decent DOM parser (my work- built on top of  SAX parser), a
logging framework, semaphore classes, http client, and other things.  I
would love to see large portions of Mango replace large parts of Phobos,
and the rest of it to become the javax of Phobos (and optional, extended
part of the standard library) since not everyone needs an http server or
servlet support.  I think we need to include a standard library such as
Mango in order to attract modern users used to the likes of Java and C#
libraries.  <End Mango plug>

Thoughts?

-- 
~John Demme
me at teqdruid.com
http://www.teqdruid.com/



More information about the Digitalmars-d mailing list