selfing Self

Jecel Assumpcao Jr jecel@tunes.org
Wed Mar 28 14:03:02 2001


In 1986 Smalltalk was 14 years old and had been "frozen" for 5 years. 
Some people at Xerox Parc decided to ask "could it be better?" and one 
of the results was Self.

Today, Self is 14 years old and has been "frozen" for the last 5 years. 
You can guess what I am going to ask :-)

Some background - I have been having some interesting discussions about 
programming languages with Kyle Hayes (he was one of the initial 
contributors to Tunes) for many years. He designed a RPN prototype 
based language that was more Self-like than Kevo was, and has tinkered 
with Tim Budd's languages Leda (a Pascal-like language that lets you 
mix proceedural, OO, functional and logical programming) and Little 
Smalltalk (LST).

I suggested that a "Little Self" would be simpler than LST, but as he 
looked into the issue he felt that there were many complications in the 
implementation. I had designed an OO Logo in 1983 and then a much 
better one in 1994 called NeoLogo that was more Self-like. So I started 
to explain some NeoLogo ideas that might help in the creation of a 
Little Self.

Like a simple object model: objects are just flat association lists 
(I'll use Lisp notation below) -

       (x 3 y 4)

is an object that associated the value 3 with the name "x" and the 
value 4 with the name "y". You can extend an object by adding stuff to 
the front of the list -

    append '(z 9) '(x 3 y 4)

Code is just a list of "tokens" -

   (rocket speed: rocket speed + g)

with the simple syntax <receiver> <selector> <arg1> <arg2>... where 
<receiver> is implied for the first selector in the list and in <arg1>. 
Kyle, of course, thinks the Forth RPN order (also used in Self 
bytecodes) would be better.

I extended the object format so that if you find a list when expecting 
a selector then you search that list recursively -

         ((x : y :) 3 4)

where ":" indicates an indirection - the actual value is in the top 
list. These nested lists can act as both "maps" and parents (think of 
what happens when a shallow copy is made of this object).

There is more, and quite a lot that is still missing. I have these 
goals:

  - to have a system that I can explain to a 12 year old programmer
  - to have a system that allows a high performance implementation (on 
PCs, but specially on my own machines)

Though this stuff is not optimized for Self (no named parents, for 
example) it might still be a nice base on which to build Self/R. Other 
systems could also make use of it.

So my question is: would anybody be interested in this kind of thing?

-- Jecel