Self 4,1 for MacOs?

Duane Maxwell dmaxwell at entrypoint.com
Thu Nov 4 21:35:13 UTC 1999


Stefan writes:

>Sun says that their new way of describing objects is better than
>classes. Now I have always thought that a "class" is, in the first
>place, nothing more than a naming convention.
>
>Can anybody explain to me what they are talking about then? &BTW: do you
>agree with Sun, or is this just another "dot in com" talk?

What Self does is rather interesting - you basically clone existing objects
and add your own "slots" (which roughly correspond to instance variables
and methods) to the copy.  You then use it to make copies, and so on.  The
idea of classes sort of becomes irrelevant - to create a new instance of
something, you instead just find an object with the correct slots and copy
it.  You can also choose to make a very primitive object, make its parent
an existing object, and simply override and/or add slots to do what you
want.

For instance, to make a 3D Point, I'd clone a prototype 2D Point and add
the extra slot for the z value.  Since the original and the close share the
same parent object, the 3D Point inherits all of the slots (including
methods) of the original.  Now, to make more 3D Points, I clone the one I
just made.

Morphic, which came from Self, simulates these additional slots with the
"extensions" object which hangs off of Morph.  Squeak uses them most
frequently to store balloon help text.  The "duplicate" halo would be
critical in the Self world, and so would the functionality we see as
"flaps".

Frankly, Self is a very elegant system, which takes Smalltalk-like
languages towards being even simpler and easier to understand. You can
artificially impose a more familiar class structure if you want, as
evidenced by the Smalltalk implementation in Self.  Being simpler, it lends
itself pretty well to interesting implementations, including runtime
translation to native code.  I think I saw a note from one of the Squeak
luminaries (Alan?) that Self could have been Smalltalk-80's natural
successor.

I would encourage people to take a look at it.  I got tremendous insight
into Morphic's architecture and philosophy by examining Self and reading
the various white papers.




===================================================
Duane Maxwell          dmaxwell (at) entrypoint.com
CTO                       http://www.entrypoint.com
EntryPoint                      (619) 578-8500 x226

Information contained herein is my personal opinion
     and not necessarily that of EntryPoint.
===================================================





More information about the Squeak-dev mailing list