News for hackers. Stuff that matters.
Re:Diving into the world of hash tables by OJFord on Sunday June 25, 2017 @09:32PM (#14633382)
Does it really matter what the 'value' is? A set is surely implementable as a supertype of a hash, where the value is totally arbitrary; it only matters that the entry exists.

With:

    {'A': true, 'B': false}
you seem to be suggesting `B` is 'not in the set'. What's `C`?
Re:Diving into the world of hash tables by jackweirdy on Sunday June 25, 2017 @09:34PM (#14633397)
Not in the set. You're describing the same thing as the parent comment, but you're saying "arbitrary value" which they substituted for "True"
Re:Diving into the world of hash tables by freyr on Monday June 26, 2017 @12:49AM (#14634171)
They're not really the same thing then. In OJFord's implementation, there's a one-to-one correspondence between states: the element is a member of the set iff it exists as a key in the hash table.

In the true/false implementation, two distinct hash table states (false or key not set) map to one set state (not a member). The program must check whether the key is set, and then check its value.