About removing global variables
stéphane ducasse
ducasse at iam.unibe.ch
Thu Nov 25 15:43:56 UTC 2004
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
More information about the Squeak-dev
mailing list
|