[squeak-dev] Comparing collections, default behavior?
nicolas.cellier.aka.nice at gmail.com
Fri Feb 4 19:01:02 UTC 2011
2011/2/4 Igor Stasenko <siguctua at 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.
> Best regards,
> Igor Stasenko AKA sig.
More information about the Squeak-dev