[squeak-dev] Re: 0006721: Identity dictionarys sometimes can't find their keys

Jerome Peace peace_the_dreamer at yahoo.com
Tue Mar 2 22:12:33 UTC 2010

Hi Levente,


>Levente Uzonyi leves at elte.hu
>Tue Mar 2 02:21:38 UTC 2010 wrote:
>On Sun, 28 Feb 2010, Jerome Peace wrote:
>> Levente Uzonyi leves at elte.hu
>> Sun Feb 28 17:56:00 UTC 2010 replied:
>>> nil was always a valid key for Dictionary and IdentityDictionary. Sets
>>> were the collections which couldn't contain nil.
>>> Levente
>> Ha. I knew there was a good reason for having someone look over your shoulder as you program. I stand corrected.
>> Never the less, the tests were useful in finding bugs.
>> Even if 'nil' can be a legitimate key its presence is often the sign of a bug. The only instance my test found pointed to the initialization of GeeMailMorph being misplaced to UndefinedObject class. So even though I stumbled on to it with a mis-assumption the test found it. I think it's valuable to go looking, then note the legitimate exceptions in the test.
>> I would love to see my tests in the image and your test improvements as well. I am still looking for a MC savvy code partner to take over some of the driving.
>I added the general purpose integrity tests to the Trunk. Details here:
>I think a test which fails when an object has a valid (and supported) 
>state is simply wrong.

Cool. Thanks for the help.

On reflection, I agree that as an image acceptance test, the 'nil' key test doesn't hack it. On the other hand it does makes an excellent probe. Still not having it in the test suite is correct.

I am stuck working as a one man team. So I very much appreciate your supplying a second opinion. Its damn hard to double guess oneself.

The other important result is there is a test IN THE IMAGE for this critical bug which is known to happen. Good work.

>Here are a few links which cover MC:
>etc. (probably SBE/PBE has a chapter about MC too)
Thank you again. I would like to master MC. At the very least it would allow me to be a more knowledgeable Luddite. Besides at the moment there seems to be no help for it. Even Etoys is committing to it. Sigh.

Thanks for the help. I appreciate the partnering. 

Yours in curiosity and service, --Jerome Peace 

"In theory, there is no difference between theory and practice. But, in practice, there is." --Yogi 


More information about the Squeak-dev mailing list