I agree with Nicolas, but I think that it's really important that we have this discussion, reach a consensus, and them implement it!

That's why I posted the message here rather than just posting a bug report.

There used to be a method called hasSameElementsAs: (now called, inexplicably, sameElements:) that could be pressed into service so that two intervals, or an array and and interval, can have the same elements but still be unequal. But the role of species was to define when things could be equal...

Maybe we need a method "hasSameSequenceOfElementsAs:" which would be applicable to any pair of sequenceable collections, as well as being faster to implement, than sameElements: (which is currently quadratic).

On 25 Oct 2009, at 06:53, Nicolas Cellier wrote:


IMO, we should not let Array hash ~= Interval hash coexist with Array = Interval
Because it's like putting some traps on programmers path.
One day or the other an application will exhibit a non repeatable
error, just because the size of a Set was different and caused a
collision.

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to