[Glass] Question on Sets

Sebastian Heidbrink sebastian_heidbrink at yahoo.de
Fri Apr 4 08:59:17 PDT 2014

Hi Richard,

so I remembered right... thank you!

It is like defining the key fields,.. so to speak...?


Am 04.04.2014 08:55, schrieb Richard Sargent:
> SebastianHC wrote
>> Set new add: MyClass new; add: MyClass new; yourself inspect
>> then MyClass is twice in the Set,... I expected such behavior for
>> IndentitySet and not Set.
>> Similar problem with removing MyClass new from this very Set. The MyClass
>> isn't found in the set eventhough it is there.
> The most important factor in using Sets is the definition of equality and
> hash. If you don't define #=, you typically inherit one from Object which
> tests on identity. And you no doubt know that #hash must answer the same
> value for objects that compare equal, if you want to be able to reliably use
> them in hashed collections.
> --
> View this message in context: http://forum.world.st/Glass-Question-on-Sets-tp4752784p4752788.html
> Sent from the GLASS mailing list archive at Nabble.com.
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass

More information about the Glass mailing list