looking for answers to exercises in Squeak book Ch 2.

Thomas Porter txporter at mindspring.com
Fri Apr 27 04:09:58 UTC 2001


Thanks to all of you for the interesting responses to my questions.

As regards the bug-inducing practice of mangling the literal 'squeak',

I assume that my assignment of "aString := 'squeak'" merely created a variable,
aString that points to a literal, 'squeak'.  

If this is the case, then how do I ever assign a variable which was initialized
to a literal with a new value:

aString := 'foo'.
aString := 'bar'.

if the variable merely points to the literal?  Won't this also result in the
same kinds of bugs mentioned in previous posts, or have I rather created _two_
literals, or symbols, of which only the second has a active reference, and so
the first will be garbage-collected at some point?

Or am I thinking too much?

Thanks again!!

-- 
Tom Porter                                       txporter at mindspring.com
------------------------------------------------------------------------
"On two occasions I have been asked [by members of Parliament], 
'Pray, Mr. Babbage, if you put into the machine wrong figures, will 
the right answers come out?'  I am not able rightly to apprehend the 
kind of confusion of ideas that could provoke such a question."





More information about the Squeak-dev mailing list