From: Mathieu Bouchard Date: 2005-05-06T00:29:40+09:00 Subject: Re: Getting rid of Object#equal?()? ---1077017559-290036274-1115306959=:13219 Content-Type: MULTIPART/MIXED; BOUNDARY="-1077017559-290036274-1115306959=:13219" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---1077017559-290036274-1115306959=:13219 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Thu, 5 May 2005, [ISO-8859-15] Florian Gro=DF wrote: > I think that we currently have too many equality methods with similar nam= es: > I think that equal?() is rarely used and that removing it completely woul= d=20 > make sense -- after all a.id =3D=3D b.id is not much longer than a.equa= l?(b). I would agree, except for backwards-compatibility issues. > Renaming it might also be an option -- I think Object#identical?() would = be a=20 > good name. also Object#same? would be a better and shorter name, but I don't really=20 care because I'd rather write it a.id=3D=3Db.id and then I rarely ever need= =20 to even do that. > I would also like to see eql?() renamed, but I'm not sure about the name= =20 > and it also seems to be used much more which would make a change more=20 > troublesome. Perhaps hash_equal?() would be a better name. it would be troublesome to do that kind of thing because #eql? and #hash=20 are the "hashable" interface which gets redefined by user-defined code,=20 and then renaming is much trickier (aliases are pretty wrong in that=20 case). So I don't agree with this part of the proposal. ,-o---------o---------o---------o-. ,---. irc.freenode.net #dataflow | | The Diagram is the Program (TM) | | ,-o-------------o--------------o-. `-o--------------o--------------o-' | | Mathieu Bouchard (Montr=E9al QC) = | | t=E9l=E9phone: +1.514.383.3801 `---' `-o-- http://artengine.ca/matju= -' ---1077017559-290036274-1115306959=:13219-- ---1077017559-290036274-1115306959=:13219--