Need feedback on simple idea

Stephane Ducasse ducasse at
Thu Apr 10 20:36:42 UTC 2003


I would like to know what you would think of the following change in 
We are really in the mood to make some change in the compiler to play 
with the idea
for our research.

remove direct access to instance variables a la self

a class still defines instance variable but we cannot access directly 
instance variables accessors are automatically optimized to use direct 
access by the compiler.

	simplicity/uniformity no distinction between state and methods.

	no private iv anymore anymore (except if we try to have a clever schema
	that lets the programmer writing self x while the byte code remove the 
	with this schema we could have private instance variables but be 
forced to used a 	normal method to make public an accessor.
		self x

	public accessor could be then

		self x

Applicability to Squeak:
	- would break all the accessors that do something more that accessing
	(self changed) but we could use a dedicated parser/compiler so that the
	changes only impact a subset.

Prof. Dr. Stéphane DUCASSE
  "if you knew today was your last day on earth, what would you do 
different? ...  especially if,
  by doing something different, today might not be your last day on 
earth" Calvin&Hobbes

"The best way to predict the future is to invent it..." Alan Kay.

Open Source Smalltalks:,
Free books for Universities at
Free Online Book at

More information about the Squeak-dev mailing list