A strange Squeak bug

Lex Spoon lex at cc.gatech.edu
Mon Feb 7 14:16:37 UTC 2005


FWIW, there was a period of time when the variable holding a class could
not be written like this, for precisely the same error.  I thought that
was still the case, actually.

Mark Guzdial pointed out this lovely example, which new students do
frequently:

	myStuff := OrderedCollection new.  "make a collection"
	myStuff add: 3.  "put some stuff in it"
	OrderedCollection := nil.   "okay, I'm done with the collection"
	
This is a very easy mistake, quite similar to mixing up a sentence while
speaking.
	
I have mixed feelings on how to fix such things, though.  On the one
hand, I hate to see students stumble into mines like this.  On the other
hand, it is really nice that Squeak gives you access to everything, that
everything is exactly what it looks like.  

If I imagine a Squeak image that was set up to really allow (almost)
arbitrary changes without destroying the system, it would be more like
an operating system.  It would have some sort of execution space,
analagous to a process, and most work would take place outside of the
"kernel" space.  Doing "OrderedCollection := nil" in one of the spaces,
would blow up the space, but then -- like in Self -- you could go to
"Oz", another space, and debug the screwed up space from there.

But such a system, cool as it is, would lose the current coolness that
Squeak is exactly what it looks like.  Mark gets a gasp every time he
does the "Line example" demo and shows that, yes, even though you see
windows on the screen, you can still access the screen directly if you
prefer and draw on top of everything. Occasionally he even gets someone
to say "but... you can't do that!"

-Lex



More information about the Squeak-dev mailing list