[Modules][bug] Globals created from DoIts

Stephen Pair spair at advantive.com
Tue May 7 19:43:50 UTC 2002


One of the benefits of a single global namespace is that there is never
any question where global variables should be registered.  Of course, we
want to get away from a single monolithic namespace.

One of the problems this introduces is how to bind DoIts.  This is
apparent when you try to execute some workspace code that includes a
capitalized variable that you intend to make a Global when executed.
You are prompted with something that says "Declare Global in Module...".
When you select this item, you are presented with an opportunity to
enter the module in which you'd like the global declared.  After
selecting the default, I get a walkback saying that you "Cannot store
into read-only bindings" (I was trying to assign to my new global).

I see a couple of problems with this:

1. The binding is made read-only...why?

2. Why present the user with a choice of modules?  It seems that if we
want to keep the module system from being too much a burden that we
ought to have a notion of a "current module" with which all DoIts should
be bound.  This would eliminate the question of which module to place
the global.  We could deliver Squeak with a "New Changes" module already
active, similar to the way we do with change sets.

- Stephen




More information about the Squeak-dev mailing list