The subject of this mail is exactly my question.

I came to this question by looking at Object>>#= message implementation.

"""
= anObject
    "Answer whether the receiver and the argument represent the same
object. If = is redefined in any subclass, consider also redefining the
    message hash."

    ^self == anObject
"""

When do we need to redefine #hash message?

Is it the right way to implement equality between two objects or is there another message that I should override?

Regards,
Julien

Reply via email to