Issue 3657 in pharo: [Enh] Simple EqualityTest

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Issue 3657 in pharo: [Enh] Simple EqualityTest

pharo
Status: New
Owner: ----

New issue 3657 by [hidden email]: [Enh] Simple EqualityTest
http://code.google.com/p/pharo/issues/detail?id=3657

Simple solution to ease implementing = and hash.
To make instances of some class comparable, simply make the class use the  
TEquality trait.

TEquality relies on message valuesToCompareForEquality sent to objects for  
both = and hash.
The default implmentation of this message is provided by Object.
Override ONLY valuesToCompareForEquality method for custom equality check.

Paste or attach stack trace if applicable (look at the file PharoDebug.log
located in the same directory as your image):


Attachments:
        Equals-NouryBouraqadi.1.mcz  3.3 KB