[Pharo-project] Comparing collections, default behavior?

Igor Stasenko siguctua at gmail.com
Fri Feb 4 17:06:56 CET 2011


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? :)


-- 
Best regards,
Igor Stasenko AKA sig.




More information about the Pharo-project mailing list