Help, how is Set implemented?
Posted: Wed Mar 24, 2010 4:25 pm
I like to have Sets builtin in the language. I like to have set literals. But i don't think necesary to build them internally as *special* objects, other than the ones included in .NET library. Well not really, but i fell in a problem. I have a set of Tuple<of int, int>, but Set havent got any constructor passing the comparator of elements, like the one in .NET.
Possible solutions are
Possible solutions are
- - To use HashSet of System.Collection? - I can't, dont know why.
- To use a Dictionary with a Compare-objects object using keys as elements and using dummy elements. It works but it's a botch-up.