Symbiotic relationship of declarative and imperative systems

Alan Kay Alan.Kay at squeakland.org
Mon Mar 3 14:07:13 UTC 2003


Hi Stef --

Just an historical note ...

My first attempt at dynamic OOP was called Flex, and I tried to do 
two main things: extension in all areas and the abstraction of 
assignment in all areas -- both of these worked out pretty well.

Later, after seeing Carl Hewitt's Planner and some other work at MIT 
(such as Pat Winston's concept learning system) and motivated by 
Papert's LOGO work, I got very interested in doing away with 
variables in the storage sense as much as possible. The never 
implemented Smalltalk-71 embodied these ideas. Smalltalk-72 allowed 
some of these ideas to get implemented and tested, but in a 
rudimentary way because its control metastructures were not present 
in a strong enough way.

The bottom line in these early stages was to try to have messages be 
requests for larger goals to be carried out, and *not* to simply 
simulate data-structures. Now, we realized that some programs would 
look more like data-structure and procedural programming than we 
wanted because we didn't yet know how to do a real object oriented 
version of them. We thought of a "good" program as being one that had 
no visible getter and setter methods to the outside world and that 
the interior would change behavior appropriately as the result of 
satisfying goals. (This later merged with some ideas about 
event-driven objects that would pretty much *not* send and receive 
messages, but would simply respond to general changes around them 
(could be thought of as weak message receipt, etc.) -- this never got 
implemented in the 70s).

I still have many of these prejudices. So I wince every time I set a 
g/setter that is not absolutely necessary -- every time I see a 
collection used nakedly, etc. I still think that Ed Ashcroft's way of 
looking at process in his language Lucid (itself very influenced by 
the POVs of Strachey and Landin) is a really nifty way to reconcile 
the two worlds -- and I still like "information algebras" (like APL) 
that allow projections to be created. Though they all have 
interpreters, all of these systems lean very much to trying to allow 
something more like mathematical mappings to be used as a programming 
paradigm.

As you know, Croquet is very interesting as a testbed for these 
ideas. The underlying "temporal algebra" by Dave Reed is a way to 
allow very powerful methods of description (if a surface form can be 
found that is usable and understandable by programmers) -- so quite a 
lot of the scripting design that Andreas Raab has been doing with the 
modeling ideas of Dave A Smith is to find a dynamic model that is 
both programmable and incorporates the higher level integrities of 
the larger sim worlds.

Cheers,

Alan

-------

At 11:43 AM +0100 3/3/03, Stephane Ducasse wrote:
>Hi lex and alan
>
>I think that it would be good have a list of the changes that should 
>be made in squeak to have a declarative syntax.
>
>The obvious one is to have a
>	- GlobalVariable declaration, PoolDictionary,
>		instead of Smalltalk at: #MyVar put: 0
>	We should have GlobalVariable named: #MyVar initialized: '0'
>
>	- InstanceVariable declaration would be good too.
>
>	- ClassVariable
>
>	- I have doubt for classDefinition because even if this is 
>currently done via a
>	message we can interpret it as a declaration.
>
>Alan (I know that you are busy) but what would be your point items 
>for such a list.
>
>
>I think that having such a list is important for the people such as 
>Avi that could use
>a much more declarative syntax for DVS.
>
>Stef
>
>
>
>On Sunday, March 2, 2003, at 06:56 AM, Lex Spoon wrote:
>
>>
>>>This is tricky stuff, so I may not be grasping the subtleties of your
>>>explanation. As I understand it, however, "a sequence of operations
>>>that transition a system from one state to another" would be an
>>>imperative specification.
>>
>>
>>Many interpreters are going to do the following: "parse a series of
>>changes from this file, and then apply the changes in sequence".  So
>>it's not necessarily so different.
>>
>>Everyone is missing Alan's point.  A "declarative" syntax still requires
>>that you have an interpreter to make sense of it.  Thus the difference
>>is pretty subtle, at least in theory.  It's the difference between
>>interpreter+language, versus interpter1+interpreter2+language.
>>
>>
>>Let me get more pragmatic for a moment.  In *practice*, imperative versus
>>declarative is about the same.  First, you can perfectly well read a
>>Squeak fileout, in practice, as if it were declarative.  There are only
>>5-10 forms that you must support.  Second, you can go to the
>>trouble, if you like, of making up a Smalltalk environment where code
>>changes don't directly modify the system, but instead log themselves
>>into the currently active changeset.
>>
>>
>>
>>-Lex
>>
>Prof. Dr. Stéphane DUCASSE (ducasse at iam.unibe.ch) 
>http://www.iam.unibe.ch/~ducasse/
>  "if you knew today was your last day on earth, what would you do
>  different? ... especially if, by doing something different, today
>  might not be your last day on earth" Calvin&Hobbes


-- 



More information about the Squeak-dev mailing list