|
Re: reimplementing #= and #hash: msg#00121lang.smalltalk.squeak.beginners
Hi Ching, #hash should be reimplemented to make sure that objects considered to be equal will end up in the same hash bucket. The usual trick is to take a bitXor of the hashes of the instance variables: PoolQueue>>hash ^ member hash bitXor: processor hash Hope that helps. Oscar On Sep 23, 2007, at 9:52, Ching de la Serna wrote: Hi List,
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | reimplementing #= and #hash, Ching de la Serna |
|---|---|
| Next by Date: | Re: reimplementing #= and #hash, Janko Mivšek |
| Previous by Thread: | reimplementing #= and #hash, Ching de la Serna |
| Next by Thread: | Re: reimplementing #= and #hash, Ching de la Serna |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |