Login  Register

Re: Comparison for SequencableCollection

Posted by jtuchel on Aug 02, 2015; 8:14pm
URL: https://forum.world.st/Comparison-for-SequencableCollection-tp4840704p4840727.html

I think nobody's arguing that comparison of Collections is wrong per se. It's just that such an extension should not be part of the core libraries, or put differently, Smalltalk should not be extended in that direction, because the assumptions about what may or may not be the meaning of comparing two SequencableCollections are not universal. To me, JavaScript is far from being a positive argument ;-)

Joachim




Am 02.08.2015 um 21:50 schrieb webwarrior <[hidden email]>:

Your use case (comparing containers using pluggable comparison for
items) is pretty common.

And what I was suggesting won't solve that problem.

However, it will make sequencable collections with comparable items
comparable. That's it. If we have comparison defined for Point, why not
have it for arrays?

And no one forces you to define #= or #< for your objects if you don't
want to.


On 02.08.2015 20:23, Peter Uhnák [via Smalltalk] wrote:
>
> ... snip ...
>


View this message in context: Re: Comparison for SequencableCollection
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.