[Pharo-project] Comparing collections, default behavior?

Noury Bouraqadi bouraqadi at gmail.com
Sat Feb 5 10:40:05 CET 2011

On 4 févr. 2011, at 17:06, Igor Stasenko wrote:

> 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? :)
Need to check the species too.
I believe an array is different from a set even if they contain the same elements.


More information about the Pharo-project mailing list