<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Stephen Pair wrote:
<br>ri, 31 Aug 2001 01:03:08 -0700
<p>Dear Thomas:
<p>I have redirected your message here because  it is not my intention
<br>to knock  any language. I want programming languages to be as
good
<br>as the variety of languages around us! My favourite one is German for
<br>example!!! But I would like to know Chinese!!! The pupil of my eyes
<br>is biodiversity treaty!!!
<br> 
<br>    This sounds great! Java has sort of these facilities.
But to program in
<br>    Java is rather nasty! I do not think I am being
biased because I do need
<br>    to program with the prototypes!!!
<p>Squeak doesn't have prototypes, but it's a nice system nonetheless.
<br>Give it a try.
<p>Thanks to Stephen Pair Squeak has prototypes now!!Java thanks
<br>to Gunther Kniesel has prototypes too!!! All inspired in Self!!!
<br>Se Kniesel's Lava (Java + prototypes):
<p><A HREF="http://javalab.cs.uni-bonn.de/research/darwin/">http://javalab.cs.uni-bonn.de/research/darwin/</A>
<p>He does a real nice job!!!
<p>However, don't knock Java.  Yes, it is more effort to get stuff
<br>done in it.  On the other hand, when you are dealing with other
people's
<br>code, the type checking and extra structure is really a blessing.
<p>Yes , I understand  everybody is striving to deliver more expressive,
safe
<br>and efficient
<br>languages and unfortunately  there is no formula to make a language
<br>that is all that at the same time
<br>but ecodesign models  require this at light speed,  thought
travels
<br>at a speed higher than light says Jack Sarfatti in his Postquantum
<br>Mechanics!!! So I am sure mankind needs ecodesign modes  at
<br>thought speed!!  This is why I seem agressive!! It is my love
for
<br>mankind!!!
<p>Sustainably,
<br>Albertina
<p>Cheers,
<br>Thomas.
<br> 
<br> 
<blockquote TYPE=CITE>The following is copied from the web page: <a href="http://spair.swiki.net/21">http://spair.swiki.net/21</a>
<br>(which also contains screenshot).  It thought it may be of interest
<br>to the people on this list.
<p>-------------
<br>=== Overview
<br>This change set adds delegation capabilities to the Squeak VM. It
<br>also extends some previous work on prototypes by Hans Martin Mosner
<br>to implement a Self-like (<a href="http://self.sunlabs.com">http://self.sunlabs.com</a>)
system within
<br>Squeak.
<p>Delegation is the act of forwarding a message to another object, but
<br>maintaining the original receiver such that sends to self in the new
<br>method context will be directed back to the delegating object.
<p>=== Screenshot
<br>The following screenshot shows ProtoInspectors open on a family
<br>(literally) of objects. They are arranged according to their
<br>inheritance hierarchy. Slots with an asterisk denote parent slots
<br>(their behavior is inherited by the child). The image doesn't show
<br>it, but you may have any number of parent slots.
<p> <<see web page: <a href="http://spair.swiki.net/21">http://spair.swiki.net/21</a>>>
<p>=== Implementation Details
<br>Two new bytecodes are added to the VM:
<p>singleExtendedDelegateBytecode
<br>doubleExtendedDelegateBytecode
<br>(but the compiler has not yet been modified to generate these
<br>bytecodes)
<p>Several new primtives are added to support delegation and reflection
<p>primitiveDelegate - added to Object as #delegate:,
<br>#delegate:with:, ...etc
<br>primitiveDelegateArgs - added to Object as #delegate:withArguments:
<p>The following primitives allow a Mirror to reflect on objects without
<br>needing to send messages to the reflectee (this allows mirror to
<br>manipulate objects that may have a very lightweight protocol):
<p>primitiveGetSlots
<br>primitiveSetSlots
<br>primitiveGetProtoBehavior
<br>primitiveSetProtoBehavior
<p>The message lookup algorithm is also modified to search the parent
<br>slots of objects whos class is an instance of ProtoBehavior. This
<br>allows for instance based, multiple inheritance.
<p>Bytecodes accessing the internal structure of an object
<br>(pushReceiverVariable and kin) are modified such that the look to
<br>the "receiverStorage" object in the active context. In normal
<br>messages receiverStorage is identical to receiver, but in delegated
<br>methods, they will be different.
<p>You may create object that inherit behavior from normal Smalltalk
<br>instances (direct instance variable manipulation will affect the
<br>parent object, not the child's slots).
<p>Hans Martin Mosner's HmmProtoObject class has been dropped in favor
<br>of the Mirror class and a reflection based approach to meta-
<br>programming in the spirit of Self. To add or remove slots or methods,
<br>you must use a mirror (unless you add methods to your instance). The
<br>ProtoInpector now uses a Mirror to manipulate an object. This allows
<br>objects to be inspected and manipulated even if they have no behavior.
<p>The VM has also been enhanced such that a recursive
<br>#doesNotUnderstand: will not crash the image, but lookup the
<br>#doesNotUnderstand: on Object (and you will get a #doesNotUnderstand:
<br>on a #doesNotUnderstand: message). This was done because the
<br>likelyhood of accidentally creating objects that don't understand
<br>#doesNotUnderstand: has increased dramatically with the introduction
<br>of ProtoBehavior.
<p>There should now be enough support in the VM to implement a pretty
<br>robust implementation of Self within Squeak. It would be really cool
<br>to see the Self tools for manipulating objects recreated in Squeak.
<p>=== Issues
<br>The compiler has not been modified in any way, shape or form to
<br>implement anything like the Self syntax. This means that doing
<br>certain things can be awkward. Additionally, this means that you must
<br>use #delegate: or one of it's variants in order to accomplish what
<br>Self calls a "resend." Also, only a directed resend is possible.
<p>There is no way to store instance based source code, therefore, all
<br>methods appear in their de-compiled form. This is a pain.
<p>=== Downloading
<br>There are three things that you can download:
<p>1. A bundle that includes a demo image, changes file, and a Win32 VM
<br>2. Just the change set (you will need to compile your own VM and
<br>follow the procedure below to get an existing image prepared to run
<br>on it) 3. Just the win32 VM (note, trying to run a base Squeak image
<br>on this VM won't get you very far very fast)
<p>If you are going to compile you own VM, you will need to load the
<br>change set, and then execute the following code in a workspace to
<br>prepare the existing method contexts in your image:
<p>MethodContext allInstances do:
<br>  [ :ea | ea instVarNamed: #receiverMap put: ea receiver ]. Smalltalk
<br>snapshot: true andQuit: true.
<p>Then, you should have an image that will work on your new VM with
<br>support for delegation.
<br> 
<br> 
<p>Your use of Yahoo! Groups is subject to <a href="http://docs.yahoo.com/info/terms/">http://docs.yahoo.com/info/terms/</a></blockquote>

<pre>-- 
.----------------------------------------------------------.
| Albertina Lourenci                                       |
| PhD  in Architecture and Urbanism                        |
| post-doctorate researcher                                |
| Laboratory of Integrated Systems University of Sao Paulo |
| Avenida Professor Luciano Gualberto, 158 Travessa 3      |
| CEP: 05508-900                                           |
| Sao Paulo Sao Paulo State Brazil                         |
| Voice: +55 011 818 5254                                  |
| Fax: +55 11 211 4574                                     |
.----------------------------------------------------------.</pre>
 </html>