From: Joel VanderWerf Date: 2003-07-27T03:34:31+09:00 Subject: Re: Set doesn't have [] instance method Aredridel wrote: > On Sat, 2003-07-26 at 11:39, Brian Candler wrote: > >>On Sun, Jul 27, 2003 at 02:28:06AM +0900, Gavin Sinclair wrote: >> >>>It should, shouldn't it? It's meant to combine the fast lookup of >>>Hash with the convenience of Array, yet the most important method Hash >>>and Array have in common, Set lacks! >> >>What should it return - true/false? In which case it would just be an alias >>of 'include?' ? Personally I don't like having lots of aliases for the same >>method > > > It could return member or false -- > > s = Set.new(['a', 'b']) > s['a'] -> 'a' > s['c'] -> false What if false is a member of the set?