[squeak-dev] set equality has changed :-(

Eliot Miranda eliot.miranda at gmail.com
Mon Apr 18 23:29:56 UTC 2016


On Mon, Apr 18, 2016 at 3:43 PM, Levente Uzonyi <leves at caesar.elte.hu>
wrote:

> Hi Eliot,
>
> On Mon, 18 Apr 2016, Eliot Miranda wrote:
>
> Hi All,
>>     this used to work:
>>
>>     (Set with: #module) = (IdentitySet with: #module)
>>
>> when did this change and why?
>>
>
> I changed it in Collections-ul.669 last November, because it didn't work
> well. Let's see a different example:
>
> | s i |
> s := Set with: 'module' copy.
> i := IdentitySet with: 'module' copy.
> {
>         s = i.
>         i = s
> }
>
> The old implementation would return #(false true), while the new one
> evaluates to #(false false).
>

Right.  That's a pain, but fair enough.  This is clumsy: (aSet size = 1
and: [aSet anyOne = #module]).  This slightly less so:  aSet = (aSet
species with: #module).

Levente
>
> _,,,^..^,,,_
>> best, Eliot
>>
>
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160418/b7297b45/attachment.htm


More information about the Squeak-dev mailing list