Design

Self
is a pure object oriented programming language. In contrast to other definitions
of object-orientedness, all activities in a computer system is carried out by
a set of communicating objects. This is the closest realization of the design
principles laid out by Dan Ingalls in the famous Byte August 1981 issue ("The
Design Principles behind Smalltalk", here is
an online copy) that lead to the development of the Smalltalk programming language
and the graphical user interface with windows and mouse.

In contrast to the Smalltalk and
virtually all other programming languages and their derived design methodologies,
neither classes nor
variables are
concepts intrinsic to the language. The Self programming model relies solely
on communicating objects and a simple form of inheritance .
All other concepts, like classes, variables, arithmetics, control structures,
and so on, are emulated with this very simple but powerful object model.

Compiler

At the time when the Self language was designed, the fasted known implementation
of object oriented languages were just-in-time compilers for byte codes (D. Ungar:
thesis about Smalltalk on a RISC ,
Stanford 1986). Due to the additional overhead of emulating even the simplest
classical constructs with pure object oriented means, it was clear from the beginning
that Self required a completely new approach to compile it efficiently.

For this purpose, a new technique called dynamic type inference was invented
that attributes the Self program with type information. For an untyped programming
language like Self, this is an non-trivial task since the pure object-oriented
programs do not contain any type information at all. Instead, the compiler constructs
an ad-hoc model of the specific type situation at run-time that may even change
during the course of the program.

This derived type information is used by the compiler to create different
versions of subroutines to implement communication methods, each of which is
customized for different argument and system state types. If the range of applicable
types is restricted by customization, the time-consuming message-lookup of late-binding
can be performed at compile time, and the resulting code can be inlined into
the customized code.

This whole idea is called "dynamic compilation". It is so useful
that it has been adopted by Sun in its Java
Hotspot compiler.
Microsoft C# .NET uses a similar technique. Transmeta uses
it to translate x86 binary code into their proprietary VLIW instruction set transparently.
It is also useful to compile typeless languages, like the Matlab compiler of
Catalytic
and MOUSE .

More information about the Self compiler technology can be found at Sun's
web site .

GUI

Another groundbreaking feature of Self was its innovative user interface ,
which was later called the Green
Project .
In this system, every object became directly tangible by the user which could
manipulate every aspect of every object directly.

Unfortunately, the Green Project was abandoned in favor of the Java programming
language. Java is a compiled language and allows for strict separation of developers
(who compile the programs) and consumers (who use the programs, but are not supposed
to change them).

The underlying framework of the Green Project is called Morphic ,
and it was been back-ported to the Squeak Smalltalk
system.