Since Collection includes #difference: protocol,
i just thought that the default equality could be expressed like following:
Collection>>= otherCollection ^ (self difference: otherCollection) isEmpty
In other words, if two things having no differences, then they are equal. No? :)
2011/2/4 Igor Stasenko siguctua@gmail.com:
Since Collection includes #difference: protocol,
i just thought that the default equality could be expressed like following:
Collection>>= otherCollection ^ (self difference: otherCollection) isEmpty
In other words, if two things having no differences, then they are equal. No? :)
Let's presume difference is defined compatibly to this goal. Equality would answer false at first difference instead of collecting all the differences first.
Nicolas
-- Best regards, Igor Stasenko AKA sig.
squeak-dev@lists.squeakfoundation.org