Where are system globals (Smalltalk and SystemOrganization)

Yoshiki Ohshima Yoshiki.Ohshima at acm.org
Thu Dec 9 03:53:54 UTC 2004


  Aaron,

> Ah.
> 
> The key is a Symbol.
> 
> So you have to run the code to find that out. And there is no other simple 
> way ?

  A more "retrospective" (?) way, or a way to avoid to execute
critical code directly is to ask "themselves" (i.e. objects) what
invariant they satisfy.

  In this case, a line something like:

  Smalltalk keys collect: [:i | i class].

would return a set with just one element (Symbol).  This means that
the keys of Smalltalk are all Symbols. 

> Thanks, I should have known that,

  Now, David (Lewis) and my suggestion about inserting "self halt" are
going to make sense?

  Yes, but this is one of the downside of a highly dynamic language.
The "type" info helps to understand code.  Of course, the info can be
supplied in other forms like comments or unit tests so doesn't
necessarily have to be part of the code...

-- Yoshiki




More information about the Squeak-dev mailing list