dcollections 0.01 release

torhu no at spam.invalid
Tue May 6 16:18:35 PDT 2008


Steven Schveighoffer wrote:
> "torhu" wrote
>> Steven Schveighoffer wrote:
>>> I've been tinkering with a collection package that is a hybrid between 
>>> C++, Java, and Tango, utilizing the best D features (such as slicing, 
>>> foreach, etc.).
>>
>> Interesting stuff.  Any plans for adding sorting?
> 
> I wasn't planning on it...
> 
> I think sorting really only makes sense in cases where quick lookup is 
> possible.  The implementations I support are:
> 
> RBTree -> already sorted
> Hash -> can't be sorted
> Link -> don't have quick lookup.
> Array -> possible to sort using the built-in array sort:
> 

I was mostly thinking about a sortable linked list.  I guess it can be 
done by copying the contents into another container, like you suggest. 
How fast that would be would probably depend on how your linked list is 
implemented, how much needs to be copied before sorting can be done.


More information about the Digitalmars-d-announce mailing list