From: timsuth@... (Tim Sutherland) Date: 2004-03-01T22:14:45+09:00 Subject: Re: Set of Sets and eql? In article , Tim Sutherland wrote: [...] >I don't understand why we have eql? and don't just use == in Hashes. [...] I just realised why :) It's because we require that a.eql?(b) implies a.hash == b.hash. Forcing people who define #== to be structural equality to also define #hash to follow this would be an onerous restriction. Similarly, defining Set#hash that behaves nicely if eql? is == is tricky because we don't have a nice ordering of elements in the set. Need something like SortedSet but with sort_by to use ==. (Since element#<=> does not have to match element#==.) -- Tim Sutherland 2004 SDKACM President Software Developers' Klub - the University of Auckland ACM Student Chapter http://www.sdkacm.com/