Stef, A bad idea, IMO. A namespace should be a place for mapping names to objects, the behavior kind is a special case.
In UML, a *component* is a model element that encapsulates other elements, its named parts. In BabyUML, a component is an object that encapsulates a number objects, its named parts. This component maps names to parts in a private namespace.
In general, I feel that we do not get the full benefit of object orientation by exclusively focusing on classes and class structures. This was a weakness of early UMLs, it is also a weakness of current Smalltalks.
So let namespaces bind names to objects in general. Your work on multiple workspaces opens vistas of different kinds of system modularization, their namespaces will contain many interesting objects the like of which are not found in the current Smalltalk dictionary.
Cheers --Trygve
At 25.11.2004 16:43, you wrote:
Hi
I wanted to get feedback about the idea of removing global variables in Smalltalk. The fact that system dictionary or a namespace can contain variable ie (a binding to something else than a class) makes the code quite ugly since we have to always test if this is a class or not.
I think that we could easily remove the possibility to have global variable and move the ones we have into classVariable of Smalltalk or appropriate classes. This would lead to a more modular system.
Smalltalk keysAndValuesDo: [:k :v | v isBehavior ifFalse: [Transcript show: k ; cr]]
ImageImports Display ScheduledControllers ScriptingSystem Smalltalk CustomEventsRegistry World SystemOrganization References ActiveHand Transcript Undeclared SourceFiles Processor ActiveWorld TextConstants Sensor ActiveEvent
Now we would have to type Smalltalk transcript instead of Transcript.
Any thoughts.
Stef
PS: Backward compatibility is not a reason since we are about inventing the future not the past