[Newbies] Collection>>Includes:...

cdrick cdrick65 at gmail.com
Mon Aug 21 14:36:39 UTC 2006


2006/8/7, stéphane ducasse <ducasse at iam.unibe.ch>:
>
> Hi florent
>
> Read K. Beck idiom on redefining = normally you MUST also redefine hash
>
> the pattern Kent suggested was
>
>
> Book>>= anBook
>         (self author = anBook author ) and: [self name = anBook name]
> (a)
>
> Book>>hash
>         self author hash bitXor: self  name hash     (b)
>

I'm aware of that... but I just don't understand what's: 'hash bitXor:'

why (a) is not sufficient ?

hash tables doesn't talk to me too much ;).
What I imagine is that bitXOr gives a logical (byte) representation ?  and
these are used in a table (hash) to access objects (pointers)?

Cédrick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20060821/4677e64f/attachment.htm


More information about the Beginners mailing list