help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] bug: Smalltalk snapshot: aString


From: LD
Subject: Re: [Help-smalltalk] bug: Smalltalk snapshot: aString
Date: Mon, 3 Oct 2005 10:22:32 +1000

Hi there,

On 02/10/2005, at 6:26 PM, Stefan Schmiedl wrote:

LD (02.10. 13:01):

Is the Smalltalk class use above an alias for SystemDictionary? How
does this all tie together in other words? Where is this behaviour
customised?

Talk to the system:

GNU Smalltalk ready

st> Smalltalk class name !
#SystemDictionary
st> SystemDictionary allInstances !
WeakArray new "<0x2a9617ecc0>"
st> SystemDictionary allInstances size !
1
st> SystemDictionary allInstances first = Smalltalk !
true

So you see that Smalltalk is an instance of SystemDictionary.
The capital letter is used for "global" variables which are
automatically looked up in the SystemDictionary instance referenced by
the symbol #Smalltalk:

st> Smalltalk at: #Object !
Object
st> Smalltalk at: #SystemDictionary !
SystemDictionary
st> Smalltalk at: #Smalltalk !
SystemDictionary new: 512 "<0x2a96104030>"
st> Smalltalk !
SystemDictionary new: 512 "<0x2a96104030>"

Smalltalk is interactive and introspective -- you just need to ask the
right questions...

Cheers. That's helpful...

with regards,
--

LD






reply via email to

[Prev in Thread] Current Thread [Next in Thread]