<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Mon, 22 Mar 1993 12:32:49 +0000 (GMT)
From   : "I Stephenson" <ian@...>
Subject: Smalltalk! (well almost!)

Over the weekend I was playing with an interpretter for an almost smalltalk,
running on Acornsoft ISO pascal!

Before you get too excited, I'll qualify that a little...

The system is a demo, taken from a book about languages and they're inmplementation. 
It takes a primitive language, and extends it to incorporate the interesting 
features of a number of real languages (lisp, ptolog, scheme, apl etc). 
The results are not realy that close to the languages they claim to be, but
have all the interesting features (the underlying syntax is that of the primative
language which uses a prefix notation, so everything loos like lisp!).

I'm personaly interested  in the smalltalk version, as its very close to 
my favourite language Objective C. There are a number of problems with using 
this as anything other than a demo system - the worst being its use of memory 
- not so much a leak as a flood. In order to keep the interpreter simple
it makes NO atempt to reclaim memory. The book does however give a description
of how to fix at least the worst of this.

Other than that the system lacks any interface to the OS, enumerated intance
variables, messages to super, Class variables, and the treatment of Classes
as first class objects (MetaClasses etc).

That sounds pretty negative, but the system does have most of the good bits 
- basically full class inheratance, and dynamic binding of objects. Most
of the problems are either soluble, or not realy such a big deal anyway -
I actually thing that the class definitions syntax is neater that real smalltalk!

The interpreter is about 1000 lines of Pascal, and compiles to about 10K. 
It works fine on a co-processor, though I haven't tried it on an unexpended
machine. Performance is adaquate for initial experiments, could be improved
by optimising the evaluation stratagy.

I've placed the whole set of stuff on  shiraz called "kamim-c.tar.Z". If
anyone out there is good at compiler internals, I think we could make something
usefull from it.

Ian

P.S. I'm currently also hacking around a sound file player - unfortunatly
I get hassle for testing it during working hours!
$
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>