<s>
Self	O
is	O
an	O
object-oriented	B-Language
programming	I-Language
language	I-Language
based	O
on	O
the	O
concept	O
of	O
prototypes	B-Application
.	O
</s>
<s>
Self	O
began	O
as	O
a	O
dialect	O
of	O
Smalltalk	B-Application
,	O
being	O
dynamically	O
typed	O
and	O
using	O
just-in-time	O
compilation	O
(	O
JIT	O
)	O
as	O
well	O
as	O
the	O
prototype-based	B-Application
approach	O
to	O
objects	O
:	O
it	O
was	O
first	O
used	O
as	O
an	O
experimental	O
test	O
system	O
for	O
language	O
design	O
in	O
the	O
1980s	O
and	O
1990s	O
.	O
</s>
<s>
In	O
2006	O
,	O
Self	O
was	O
still	O
being	O
developed	O
as	O
part	O
of	O
the	O
Klein	O
project	O
,	O
which	O
was	O
a	O
Self	O
virtual	B-Architecture
machine	I-Architecture
written	O
fully	O
in	O
Self	O
.	O
</s>
<s>
Several	O
just-in-time	O
compilation	O
techniques	O
were	O
pioneered	O
and	O
improved	O
in	O
Self	O
research	O
as	O
they	O
were	O
required	O
to	O
allow	O
a	O
very	O
high	O
level	O
object	B-Language
oriented	I-Language
language	I-Language
to	O
perform	O
at	O
up	O
to	O
half	O
the	O
speed	O
of	O
optimized	O
C	B-Language
.	O
Much	O
of	O
the	O
development	O
of	O
Self	O
took	O
place	O
at	O
Sun	O
Microsystems	O
,	O
and	O
the	O
techniques	O
they	O
developed	O
were	O
later	O
deployed	O
for	O
Java	B-Language
's	O
HotSpot	B-Language
virtual	B-Architecture
machine	I-Architecture
.	O
</s>
<s>
At	O
one	O
point	O
a	O
version	O
of	O
Smalltalk	B-Application
was	O
implemented	O
in	O
Self	O
.	O
</s>
<s>
Their	O
objective	O
was	O
to	O
push	O
forward	O
the	O
state	O
of	O
the	O
art	O
in	O
object-oriented	B-Language
programming	I-Language
language	I-Language
research	O
,	O
once	O
Smalltalk-80	B-Application
was	O
released	O
by	O
the	O
labs	O
and	O
began	O
to	O
be	O
taken	O
seriously	O
by	O
the	O
industry	O
.	O
</s>
<s>
The	O
4.3	O
version	O
was	O
released	O
in	O
2006	O
and	O
ran	O
on	O
Mac	B-Application
OS	I-Application
X	I-Application
and	O
Solaris	B-Application
.	O
</s>
<s>
A	O
new	O
release	O
in	O
2010	O
,	O
version	O
4.4	O
,	O
has	O
been	O
developed	O
by	O
a	O
group	O
comprising	O
some	O
of	O
the	O
original	O
team	O
and	O
independent	O
programmers	O
and	O
is	O
available	O
for	O
Mac	B-Application
OS	I-Application
X	I-Application
and	O
Linux	B-Application
,	O
as	O
are	O
all	O
following	O
versions	O
.	O
</s>
<s>
The	O
Morphic	O
user	O
interface	O
construction	O
environment	O
was	O
originally	O
developed	O
by	O
Randy	O
Smith	O
and	O
John	O
Maloney	O
for	O
the	O
Self	B-Operating_System
programming	I-Operating_System
language	I-Operating_System
.	O
</s>
<s>
Morphic	O
has	O
been	O
ported	O
to	O
other	O
notable	O
programming	O
languages	O
including	O
Squeak	B-Operating_System
,	O
JavaScript	B-Language
,	O
Python	B-Language
,	O
and	O
Objective-C	B-Language
.	O
</s>
<s>
Most	O
notable	O
,	O
perhaps	O
,	O
were	O
NewtonScript	B-Device
for	O
the	O
Apple	B-Device
Newton	I-Device
and	O
JavaScript	B-Language
used	O
in	O
all	O
modern	O
browsers	O
.	O
</s>
<s>
Other	O
examples	O
include	O
Io	B-Application
,	O
Lisaac	O
and	O
Agora	B-Language
.	O
</s>
<s>
The	O
IBM	O
Tivoli	O
Framework	O
's	O
distributed	O
object	B-Language
system	I-Language
,	O
developed	O
in	O
1990	O
,	O
was	O
,	O
at	O
the	O
lowest	O
level	O
,	O
a	O
prototype	B-Application
based	I-Application
object	B-Language
system	I-Language
inspired	O
by	O
Self	O
.	O
</s>
<s>
This	O
issue	O
is	O
one	O
of	O
the	O
motivating	O
factors	O
behind	O
prototypes	B-Application
.	O
</s>
<s>
Experience	O
with	O
early	O
OO	O
languages	O
like	O
Smalltalk	B-Application
showed	O
that	O
this	O
sort	O
of	O
issue	O
came	O
up	O
again	O
and	O
again	O
.	O
</s>
<s>
Dynamic	O
languages	O
such	O
as	O
Smalltalk	B-Application
allowed	O
for	O
this	O
sort	O
of	O
change	O
via	O
well-known	O
methods	O
in	O
the	O
classes	O
;	O
by	O
changing	O
the	O
class	O
,	O
the	O
objects	O
based	O
on	O
it	O
would	O
change	O
their	O
behaviour	O
.	O
</s>
<s>
(	O
This	O
is	O
one	O
form	O
of	O
the	O
fragile	B-Application
base	I-Application
class	I-Application
problem	I-Application
.	O
)	O
</s>
<s>
Further	O
,	O
in	O
languages	O
like	O
C++	B-Language
,	O
where	O
subclasses	O
can	O
be	O
compiled	O
separately	O
from	O
superclasses	O
,	O
a	O
change	O
to	O
a	O
superclass	O
can	O
actually	O
break	O
precompiled	O
subclass	O
methods	O
.	O
</s>
<s>
(	O
This	O
is	O
another	O
form	O
of	O
the	O
fragile	B-Application
base	I-Application
class	I-Application
problem	I-Application
,	O
and	O
also	O
one	O
form	O
of	O
the	O
fragile	B-Error_Name
binary	I-Error_Name
interface	I-Error_Name
problem	I-Error_Name
.	O
)	O
</s>
<s>
In	O
Self	O
,	O
and	O
other	O
prototype-based	B-Application
languages	I-Application
,	O
the	O
duality	O
between	O
classes	O
and	O
object	O
instances	O
is	O
eliminated	O
.	O
</s>
<s>
Basic	O
objects	O
that	O
are	O
used	O
primarily	O
to	O
make	O
copies	O
are	O
known	O
as	O
prototypes	B-Application
.	O
</s>
<s>
Self	O
,	O
like	O
Smalltalk	B-Application
,	O
uses	O
blocks	O
for	O
flow	O
control	O
and	O
other	O
duties	O
.	O
</s>
<s>
The	O
syntax	O
for	O
accessing	O
slots	O
is	O
similar	O
to	O
that	O
of	O
Smalltalk	B-Application
.	O
</s>
<s>
In	O
Smalltalk-80	B-Application
,	O
the	O
same	O
expression	O
would	O
be	O
written	O
as	O
:	O
</s>
<s>
assuming	O
base	O
,	O
ligature	O
,	O
height	O
and	O
scale	O
were	O
not	O
instance	B-Application
variables	I-Application
of	O
self	O
but	O
were	O
,	O
in	O
fact	O
,	O
methods	O
.	O
</s>
<s>
In	O
theory	O
,	O
every	O
Self	O
object	O
is	O
a	O
stand-alone	B-General_Concept
entity	O
.	O
</s>
<s>
In	O
this	O
way	O
Self	O
handles	O
duties	O
that	O
would	O
use	O
inheritance	B-Language
in	O
class-based	O
languages	O
.	O
</s>
<s>
Unlike	O
with	O
inheritance	B-Language
or	O
lexical	O
scoping	O
,	O
the	O
delegate	O
object	O
can	O
be	O
modified	O
at	O
runtime	O
.	O
</s>
<s>
One	O
feature	O
of	O
Self	O
is	O
that	O
it	O
is	O
based	O
on	O
the	O
same	O
sort	O
of	O
virtual	B-Architecture
machine	I-Architecture
system	O
that	O
earlier	O
Smalltalk	B-Application
systems	O
used	O
.	O
</s>
<s>
That	O
is	O
,	O
programs	O
are	O
not	O
stand-alone	B-General_Concept
entities	O
as	O
they	O
are	O
in	O
languages	O
such	O
as	O
C	B-Language
,	O
but	O
need	O
their	O
entire	O
memory	O
environment	O
in	O
order	O
to	O
run	O
.	O
</s>
<s>
This	O
requires	O
that	O
applications	O
be	O
shipped	O
in	O
chunks	O
of	O
saved	O
memory	O
known	O
as	O
snapshots	O
or	O
images	B-Operating_System
.	O
</s>
<s>
One	O
disadvantage	O
of	O
this	O
approach	O
is	O
that	O
images	B-Operating_System
are	O
sometimes	O
large	O
and	O
unwieldy	O
;	O
however	O
,	O
debugging	O
an	O
image	O
is	O
often	O
simpler	O
than	O
debugging	O
traditional	O
programs	O
because	O
the	O
runtime	O
state	O
is	O
easier	O
to	O
inspect	O
and	O
modify	O
.	O
</s>
<s>
(	O
The	O
difference	O
between	O
source-based	O
and	O
image-based	O
development	O
is	O
analogous	O
to	O
the	O
difference	O
between	O
class-based	O
and	O
prototypical	O
object-oriented	B-Language
programming	I-Language
.	O
)	O
</s>
<s>
Self	O
VMs	O
achieved	O
performance	O
of	O
approximately	O
half	O
the	O
speed	O
of	O
optimised	O
C	B-Language
on	O
some	O
benchmarks	O
.	O
</s>
<s>
The	O
garbage	B-General_Concept
collector	I-General_Concept
for	O
Self	O
uses	O
generational	O
garbage	B-General_Concept
collection	I-General_Concept
which	O
segregates	O
objects	O
by	O
age	O
.	O
</s>
<s>
This	O
technique	O
gives	O
excellent	O
performance	O
,	O
although	O
after	O
running	O
for	O
some	O
time	O
a	O
full	O
garbage	B-General_Concept
collection	I-General_Concept
can	O
occur	O
,	O
taking	O
considerable	O
time	O
.	O
</s>
<s>
This	O
removes	O
the	O
need	O
to	O
do	O
many	O
method	O
lookups	O
and	O
permits	O
conditional	O
branch	O
statements	O
and	O
hard-coded	O
calls	O
to	O
be	O
inserted	O
-	O
often	O
giving	O
C-like	O
performance	O
with	O
no	O
loss	O
of	O
generality	O
at	O
the	O
language	O
level	O
,	O
but	O
on	O
a	O
fully	O
garbage	B-General_Concept
collected	I-General_Concept
system	O
.	O
</s>
