Oh! I see where I got confused now!

"static" variables in Pharo outlive their Playground call!

If I call

Greeter greet.
Greeter greeting: 'Hi!'.
Greeter greet.

Even if greet sets greeting to an initial value if it is nil, it will
forever then stay 'Hi!' until I change it or reset it.

So it is not unreasonable to get a response 'Hi! Hi!' in the playground even
though 'Hi!' only gets set after greet is called, since the global state
outlives the Transcript!




--
View this message in context: 
http://forum.world.st/How-does-Pharo-store-instance-variables-tp4917924p4917935.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.

Reply via email to