On Sun, 15 Nov 2009 01:17:25 -0500, dsimcha <dsim...@yahoo.com> wrote:
After looking at dcollections some more, it looks very well thought out
and IMHO
is a good starting point for a std.collections, provided a few issues
are taken
care of:
1. License needs to be Boost, not BSD. You'd need to relicense it
under Boost.
Yes, I need to do that...
2. Needs to be D2-ified, which you mentioned a few posts back that you
were going
to do anyhow.
Yes.
3. I don't know how your cursor concept would interact with ranges.
You've
mentioned that cursors have some capabilities that ranges don't, but
they are also
more awkward to use. For a std.collections, I think being range-based
is a must.
I agree. I want to try and preserve the functions that cursors provide
aside from ranges (namely, referring to a single element). What I'm
planning to do is have ranges replace the traversal functions of cursors
and change cursors to simply reference types. That is, you can maintain a
cursor that points at a given element, but you can't move it to another
element in the container without changing it back into a range.
BTW, cursors are just C++ iterators, but the term Iterator is currently
defined in Tango as something that you can pass to foreach, so I needed a
different name :)
Now, if I could just find the time...
Also, have you considered contributing the Hash class to the AA project
on dsource
and nominating it to replace the current AA implementation?
My hash implementation isn't anything special, I basically implemented the
pseudo code from my algo book. The only reason it outperforms AA is
because of the custom allocator.
-Steve