Sets yet again :)
Fredrik Olsson
peylow at treyst.se
Fri Mar 10 06:26:04 PST 2006
Hasan Aljudy skrev:
> Fredrik Olsson wrote:
<snip>
> Just write a set class. It's not /that/ hard.
That I already have, two implementations: Set and SmallSet, the first
using a hash table and the second a bit field for speed.
But that is sort of not the point, if D did not have arrays I am quite
sure no one would suggest "Write an array class", it is how Java and
.net have solved it, but it is not the best solution, proved by both
Java, C# and others "knows" about arrays anyway.
Same goes for strings "write a string class", the C++ crowd have settled
for that, the D crowd have not, and I think we all feel better off that way.
My argument is the same with sets, it is such a useful, beautiful and
natural part of programming that it should not be treated as a second
class citizen in some backwater library.
// Fredrik
More information about the Digitalmars-d
mailing list