dcollections 1.0 and 2.0a beta released

Steven Schveighoffer schveiguy at yahoo.com
Thu May 20 19:11:03 PDT 2010


Pelle Wrote:

> On 05/20/2010 03:22 PM, Steven Schveighoffer wrote:
> > One thing I just thought of -- in dcollections, similar types can be compared to one another.  For example, you can check to see if a HashSet is equal to a TreeSet.  But that would not be possible without interfaces.
> >
> > -Steve
> 
> I'm sorry, but I think that's a misfeature. In my opinion, a tree is not 
> equal to a hash table, ever.

They aren't trees and hashtables, they are sets.  The "quick lookup" feature is implemented via a hashtable or tree.  Basically, a set is defined by the exact elements in it, regardless of order.  Comparing two sets for equality should always be possible.

-Steve


More information about the Digitalmars-d-announce mailing list