About removing global variables

Alejandro F. Reimondo aleReimondo at smalltalking.net
Thu Nov 25 13:40:52 UTC 2004


Hi all,

> I wanted to get feedback about the idea of removing global variables in
> Smalltalk.

What about removing "variables" ?
We have names to refer to objects (we do not have variables).
Assignment is assignment of names, not of memory or other kind
of space to fix an object (or data :).
On assignment we name an object, nothing varies.

> PS: Backward compatibility is not a reason
> since we are about inventing
> the future not the past

Please consider the convenience of removing
the link to most programming languages in
all the sites we use "xxx variable" to refer to
named objects or parts of an object.
Global names, pool names, instance names, species names...
All are ok for me; they must be used in the right way,
must not be removed because some people are using
them in the wrong way.

Another topic (of my interest) is the correctness
 of the world "class" in an ambience(an open system).
A class refers to an element of a formal theory.
In Smalltalk we can work with other techniques
than formalisms, and most of the times the "classes"
changes without verification of correctness.
So we must name "Species" to the objects we are
 using because they are part of an stable ambience.
Programming in an ambience is not "class oriented" programming,
but species oriented programming, because all the species are
part of an ambient, and must grant it´s stability (and not it's
correctness as classes in a theory) while growing/maturing.

best,
Ale.



----- Original Message ----- 
From: "stéphane ducasse" <ducasse at iam.unibe.ch>
To: "The general-purpose Squeak developers list"
<squeak-dev at lists.squeakfoundation.org>
Sent: Thursday, November 25, 2004 4:43 PM
Subject: About removing global variables


> 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