"...but none of us wanted to write in C"

PhiHo Hoang phiho.hoang at rogers.com
Sun Feb 10 23:12:05 UTC 2002


     "We determined that implementation in C would be key to portability
but none of us wanted to write in C. However, two of us had once adapted
the Smalltalk formatter (pretty-printer) to convert a body of code to
BCPL. Based on that experience, we determined to write and debug the
virtual machine in Smalltalk. Then, in parallel, we would write (also in
Smalltalk) a translator from Smalltalk to C, and thus let Smalltalk
build its own production interpreter."

>From "Back to the Future: The Story of Squeak, A Practical Smalltalk
Written in Itself"
http://users.ipa.net/~dwighth/squeak/oopsla_squeak.html

It was so done, then the VM went forth and multiplied. Plugins were
born. 
All children are equally loved but some are more equal. 

Most plugins are just straight translation from Slang to C to satisfy
the need for speed, 'none of us wanted to write in C' (the machine did
it ;-)

Some plugins are not so straight forward. They depend on the native
platform services to do their jobs. Then someone had to write in C ;-). 

Somehow, some plugins of this kind became stuckins. Internal plugins,
external plugins, stuckins, sure caused problems for VMMaker, an attempt
to 'Build your own VM in 24 hours' (that's a very long time just to
build a VM ;-) but it's  nice to bring homemade VM to every single
Squeaker.

Besides, the piece of code designated as the Interpreter also needs
support from the native plaform and, again, someone had to write in C !
(and someone else was foolish enough to split this chunk into several
plugins including InterpreterPlugin. It is rumored that he is foolishly
trying to carve an ObjMemPlugin out of this InterpreterPlugin ;-)

People seems to forget about FFI. Isn't it true that the man who brought
us the named primitive and plugins also brought us FFI. I am late to
Squeak, I may miss a bit of the history. Please set me straight.

'None of us wanted to write in C'. If it cannot be avoided completely,
let's minimised it.

The only piece of C code that must be written by someone should be the
FFI and whatever needed to bootstrap this functionality into Squeak and
put into the only platform dependent plugin, say, PlatformPlugin. All
other needs for platform services for other plugins should be provided
through this PlatformPlugin. 

All stuckins will be liberated. None would ever be created again.(?)

With the momentum of the current modularizing process and to show that
SqF interim is really serious about this whole exercise, the first large
chunk of the image, VMConstruction, is lying squarely on the operating
table surrounded by proper authorities.(?)

Together with serious work on Block Closure, VM Optimisation, new
Compiled Method, new Image Format...,  We can all hope for the bestest
VM to come.


Cheers,

PhiHo.




More information about the Squeak-dev mailing list