I donât think there is a formal definition. Iâve heard it described as âanswers the same result when sent the same messageâ but that wouldnât work for #âidentityHashâ, so I think it is whatever you say it is in your domain. By the way, I try to avoid the term âequalâ and use âequivalentâ and âidenticalâ to describe #â=â and #â==â respectively. James
On Aug 23, 2022, at 3:48 PM, sean@clipperadams.com wrote:
Anyone know of a book that goes in depth explaining `#=`?
I've always wondered what "equal" is supposed to mean.
For example, if I have two objects representing the same person, but one has their webpage cached as state, they represent the same entity, and are interchangeable in many contexts, but also have a difference that may be important in other contexts.
Is âequalâ whatever you say it is in your domain, or is it a Smalltalk object system concept? If the latter, what is the exact expectation?