Sets
Michiel
nomail at hotmail.com
Mon Feb 5 11:16:16 PST 2007
Derek Parnell wrote:
> I just use: bool[Keytype] setName;
The problem is that the set of possible keys isn't fixed (I'll often use char[] as
key-type). So with your idea, there are two possibilities for elements not in the
set. Either they're not in the array at all, or they are, but their value is false.
This gives me a very PHPish feeling. :)
I'd feel better about it if sets were built into D. But I know using a dummy value
is an option. And that's what I'll use if I have no other choice.
More information about the Digitalmars-d
mailing list