From: Robert Dober Date: 2006-06-27T18:04:45+09:00 Subject: Re: Ruby and Java equality usage ------=_Part_60450_27021492.1151399008018 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 6/27/06, Alexandru Popescu wrote: > > Rober, thanks and thanks. I think you are right. I am a little sad > because I have hoped to find a good answer to this, so that others > will have a good reference for this subject and will not have to pass > through phylosophical times as I had when reading for the first time > about equality in Ruby. > > Unfortunately, even if I play with Ruby for almost 2 years, I don't > consider that I have enough knowledge to come up with authoritative > posts, so this is the reason for my mildy posts. If this would have > been on a Java subject, things would have been completely different > ;-), but here I just try to keep myself "low profile" and extract as > information as possible. You are doing a great job. Still, I have formulated a conclusion in the previous post, and that > will be the one that will go to the entry for update: > > #eql? is just syntactic sugar of #=3D=3D, needed for objects used as keys > in hashes (because hash implementation doesn't like to use #=3D=3D, but > only #eql?). If your class needs to override #=3D=3D, than just delegate > #eql? implementation to #=3D=3D. Please be aware that this is in contradiction to the official documentation= . Maybe the doc is wrong but nobody has claimed that so far. It will also break Hash lookup unless the reimplementation of #=3D=3D is ve= ry careful! ( I will try to demonstrate this as soon as I have a little time ) Hopefully everybody is backing me up on this one even if they think that is how it *should* be. Right now it is *not* how it is. Cheers Robert cheers and once again thanks, > > ./alex > -- > .w( the_mindstorm )p. > --- > (http://themindstorms.blogspot.com) > > > > On 6/27/06, Robert Dober wrote: > > > ... and still wondering how is this answering my question (however > > > thanks for the intention). > > > > > > Sorry for being blunt, you have started a thread, but that does not > mean > > that the thread will stay focused on your initial question, many long > > threads do not. > > At the beginning of course 90% of the posters will try to do so, and so > did > > I but than things > > will take a natural drift depending on the point of views of the > posters. > > > > I am sorry if you feel you did not get enough out of your question but > these > > things happen :(. > > On the other hand you have created a thread that has generated a > > philosophical and civilized discussion, that is already a marvellous > thing > > :). > > > > Now I would love to answer your question but maybe it would be easier i= f > you > > take a stronger position, like e.g. I think overriding =3D=3D is harmfu= ll > > because or something like this. > > > > I strongly feel that there is no *answer*, points of views shift slowly= , > > they do not jump, they depend so much on what you read or do. > > A majority of people - of course I am not in, as usual :( - agree with > your > > pov, that also is something you should cheer about ;) > > > > Just my pov, hopefully cheered you up a bit. > > Robert > > > > ./alex > > > -- > > > .w( the_mindstorm )p. > > > --- > > > (http://themindstorms.blogspot.com) > > > > > > > > > > > > --=20 Deux choses sont infinies : l'univers et la b=EAtise humaine ; en ce qui concerne l'univers, je n'en ai pas acquis la certitude absolue. - Albert Einstein ------=_Part_60450_27021492.1151399008018--