About removing global variables
ducasse at iam.unibe.ch
Thu Nov 25 15:43:56 UTC 2004
I wanted to get feedback about the idea of removing global variables in
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]]
Now we would have to type Smalltalk transcript instead of Transcript.
PS: Backward compatibility is not a reason since we are about inventing
the future not the past
More information about the Squeak-dev