From: Joel VanderWerf Date: 2008-07-08T04:50:09+09:00 Subject: Re: implementing a simple and efficient index system Robert Dober wrote: > On Mon, Jul 7, 2008 at 5:55 PM, Dave Bass wrote: >> Robert Dober wrote: >>>> Thanks, that's exactly what I was looking for! I didn't know set >>>> basically works like a hash without a key... >>> make that "without a value". >> For sets in Perl I've used hashes with an arbitrary value of 1, or >> undef. In Ruby I guess that would be values of true or nil. Any better >> suggestions, apart from using Set of course? > > true might be a better choice than nil ;) > > {}[42] --> nil > > R. Tsk. Don't you know that "true or nil" evaluates to "true"? :-P (Srsly, I think he meant true for membership and nil otherwise.) -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407