From: brangdon@... (Dave Harris) Date: 2001-10-27T04:33:52+09:00 Subject: [ruby-talk:23498] Re: Overriding #== [numeric operators; hashing and comparison; binary selector pulsar@qks.com (David Simmons) wrote (abridged): > I suggest, taking it from SmallScript, that object-equivalence #(==~) is > what you are looking for. I read that name as saying, "approximately identical to", which is not what I am looking for. I want "identical to", in the same way that #= means "equal to". In my view both notions make sense at base-level (ie non-MOP level). #== is a natural name for the function I want, by analogy with #=. If there is to be some MOP test, perhaps it should be given the strange name, perhaps #basicIdentical:. > hash/compare op correspondence > --- ------------------------------ > MOP #basicHash (corresponding to [MOP] #==) [aliased as #identHash] > USER #identEquivHash (corresponding to #==~) [not in QKS Smalltalk] > USER #hash (corresponding to #= and #==~) > USER #equivHash (corresponding to #=~) How can #==~ correspond to both #hash and #identEquivHash? Dave Harris, Nottingham, UK | "Weave a circle round him thrice, brangdon@cix.co.uk | And close your eyes with holy dread, | For he on honey dew hath fed http://www.bhresearch.co.uk/ | And drunk the milk of Paradise."