[Interval Problem] 2 cents

Alan Kay Alan.Kay at disney.com
Fri Jul 30 23:13:10 UTC 1999


I agree Andreas -- but we could also point the finger at Smalltalk-80 and
ask why doesn't it have a slot class that would allow us to change the
meaning without having to worry about what the code looks like ...

Even Bob Barton's B5000 hardware in 1961 did the right thing here. What did
it do? It looked in the slot in the Program Reference Table to see if there
was a "descriptor" (a flagged word using a special extra bit). If there
wasn't it did either the fetch of a literal value or a store of a literal
value, as we would expect. But if there was a descriptor there, it looked
to see if it was a procedure descriptor. If it was, then it called the
procedure and set a bit that indicated whether a fetch or a store (a name
call) was being attempted. The procedure was called normally and could test
the bit and either return a value or (in the case of a store) another
descriptor to be acted on by the store operator.
     This was almost perfect, except that store was an operator and thus
would be waiting to act. This meant that it was not easy to make a sparse
array (since the store operator would want to store a zero just like any
other value in the array).
     It was pondering this in the sixties that got me thinking how nice it
would be if store was only a token and not an operator at all, and that
eventually led to the oop way of naming and acting.
     The problem in Smalltalk-80 is that the assignment to a variable is
nonoop. Self did it better and tried to use the compiler to make up the
speed difference. In the old legendary Smalltalk-72, you had to quote a
variable ('foo <- 59 ) being assigned to  (a la LISP), because in its oop
scheme you were then talking to the symbol itself (foo) and it knew how to
look itself up and rebind. An unquoted symbol as the receiver (foo <- 59)
would dereference the variable to some object and the object would receive
(<- 59) and could do whatever.
     I think that the Self way is pretty good and clean, since it extends
referential transparency one more level. A little more of a metadescription
would make things even nicer and more useful ...

Cheers,

Alan

-----

At 1:43 PM -0800 7/30/99, Raab, Andreas wrote:
>And get from late binding (which is the entire point of Smalltalk) to early
>binding (which is the entire point of C) since you can't override any
>immediate inst var accesses. Argh! How I hate this...
>
>Sorry, couldn't resist.
>  Andreas
>--
>+===== Andreas Raab ========= (andreasr at wdi.disney.com) ==+
>| Walt Disney Imagineering        Phone: +1 818 544 5016  I
>I Glendale, CA                    Fax:   +1 818 544 4544  I
>+======< http://isgwww.cs.uni-magdeburg.de/~raab >========+
>
>
>> ----------
>> From: 	Andres Valloud
>> Reply To: 	squeak at cs.uiuc.edu
>> Sent: 	Friday, July 30, 1999 2:47 PM
>> To: 	Squeak
>> Cc: 	recipient list not shown
>> Subject: 	[Interval Problem] 2 cents
>>
>> Hi.
>>
>> I think it would be a good idea to remove the self sends from any fix,
>> and replace
>>
>> self someInstanceVariablePlainAccessorMethodNamedTheSame
>>
>> with
>>
>> theInstanceVariableItself.
>>
>> Because then you start adding message sends and that is time expensive.
>>
>> Andres.
>>
>>





More information about the Squeak-dev mailing list