[Edu-sig] Python & Smalltalk (was Re: OLPC related: pyGTK)

Paul D. Fernhout pdfernhout at kurtz-fernhout.com
Thu Dec 21 14:00:05 CET 2006

ajsiegel at optonline.net wrote:
> Squeaks pretense issues, and its licensing issues, are - by the way -  not unrelated
> when you look at it.

Sometimes I think something like that myself. :-)

But, to elaborate on your point a little more (in a toned down way :-):

Smalltalk came out of an industrial research lab (Xerox PARC). The people 
who invented and then built it and refined it were paid industrial 
employees working in the scope of their duties on company time (though 
very unusual ones, even by such R&D standards. :-) Its subsequent history 
for decades involved mainly development by commercial organizations 
(either as Smalltalk or also as the Macintosh OS which in some sense was a 
Smalltalk-derivative, but Steve Jobs just got the window system because he 
left too soon. :-).
"One of the best parts of the [1979] demo was when Steve Jobs said he 
didn't like the blt-style scrolling we were using and asked if we cold do 
it in a smooth continuous style. In less than a minute Dan found the 
methods involved, made the (relatively major) changes and scrolling was 
now continuous! This shocked the visitors, espeicially the programmers 
among them, as they had never seen a really powerful incremental system 
"Steve Jobs: ... That's the real gem. I'll tell you an interesting story. 
When I was at Apple, a few of my acquaintances said "You really need to go 
over to Xerox PARC (which was Palo Alto Research Center) and see what 
they've got going over there." They didn't usually let too many people in 
but I was able to get in there and see what they were doing. I saw their 
early computer called the Alto which was a phenomenal computer and they 
actually showed me three things there that they had working in 1976. I saw 
them in 1979. Things that took really until a few years ago for us to 
fully recreate, for the industry to fully recreate in this case with 
NeXTStep. However, I didn't see all three of those things. I only saw the 
first one which was so incredible to me that it saturated me. It blinded 
me to see the other two. It took me years to recreate them and rediscover 
them and incorporate them back into the model but they were very far ahead 
in their thinking. They didn't have it totally right, but they had the 
germ of the idea of all three things. And the three things were graphical 
user interfaces, object oriented computing and networking. Let me go 
through those. Graphical interface: The Alto had the world's first 
graphical user interface. It had windows. It had a crude menu system. It 
had crude panels and stuff. It didn't work right but it basically was all 
there. Objects: They had Smalltalk running, which was really the first 
object-oriented language. Simula was really the first but Smalltalk was 
the first official object oriented language. Third, networking: They 
invented Ethernet there, as you know. And they had about two hundred Altos 
with servers hooked up in a local area network there doing e-mail and 
everything else over the network, all in 1979. I was so blown away with 
the potential of the germ of that graphical user interface that I saw that 
I didn't even assimilate or even stick around to investigate fully the 
other two."

Essentially Xerox Parc in 1976 (thirty years ago!) invented the computing 
landscape most of us use now, and Alan Kay was part of that. What we have 
seen since is mainly just the dispersal and magnification of those ideas 
(often in a warped or dumbed down fashion, e.g. C++ instead of Smalltalk; 
XML instead of Lisp).

Smalltalk's demise as a major player on the commercial scene in terms of 
VisualWorks and its predecessor ObjectWorks (*the* leading Smalltalk 
product, and still the most comprehensive and definitive and most 
cross-platform -- excepting perhaps Squeak is more cross-platform in 
theory) was mostly due to greed and mismanagement IMHO by a now defunct 
company (the current VisualWorks owners bought it cheaply from them). 
IBM's VisualAge Smalltalk's demise, on the other hand, was mostly due to 
IBM's decision to back Java (shortsighted and unfortunate I think as IBM 
had the clout to push Smalltalk syntax through to the masses IMHO). 
Smalltalk is still actively used by many, but is more of a niche player at 
the moment (like, say, OCaml or Haskell or Common Lisp), having been 
eclipsed by Java. The support community for Smalltalk was (at first) 
mostly commercially oriented, and remains so to some degree. While there 
were academic users, and in the past decade, especially with Squeak, the 
number of people using it for academic or free or open source type 
applications has grown, that has not been the bulk of the history. Even 
Squeak's most recent evolution was driven by work at Apple and then at 
Disney, with the Smalltalk principals reprising their roles as employees 
of large industrial research and development labs, with the licensing 
ambiguity that sometimes entails in navigating for-profit corporate waters 
in an emerging free-and-open-source way (i.e. Alan Kay claims Disney is OK 
with the Squeak changes done there being released, but there is no "peace 
of mind" letter from Disney signing off on them I am aware of, or related 
licensing statement in the code).

Python on the other hand, was started as a hobby by one person who was 
based in an academic research lab. It was always given freely. Excepting 
one bobble with licensing issues (which was corrected and involved a 
not-for-profit), the licensing situation has always been pretty 
straightforward from a free software perspective (and is even now GPL 
compatible). For most of Guido's time with python (except the last few 
years) he was affiliated with one of two non-profits. Even now his job is 
at a pro-"open source" corporation which is also releasing several other 
free and open source projects. The community that grew around Python, 
while with many commercial users, had a very different emphasis to it. 
Part of that early community spirit was also from the "Monty Python" 
humorous yet playfully radical themes (although Guido has said by now he 
has heard enough Monty Python jokes. :-) Python also has one core 
definitive free code base as a reference standard implementation (even as 
there are spinoffs like Jython).

Personally, I feel Smalltalk is the better syntax for kids to learn as 
that purpose was what it was supposedly designed for (if you ignore that 
most adult programmers come from Algol syntax and have trouble adapting to 
the syntax initially); Smalltalk keyword: syntax is certainly the easier 
syntax to use to maintain large bodies of code using powerful tools and is 
easily extendable by the end user programmer for many new uses including 
new control structures and iteration concepts; Smalltalk historically also 
has the better development tools (in part due to the syntax) and also has 
a better library architecture (e.g. Streams, Magnitude) and better VMs and 
garbage collection(especially in VisualWorks, and less so in Squeak), and 
also has benefited from a culture of Smalltalk all-the-way-down (as Squeak 
exemplifies); Smalltalk has a powerful notion of bracketed nameless code 
blocks and is a tour de force of one paradigm (objects and message passing).

However, Python has the better community (from a free and open source 
perspective), better license and licensing history, and better breadth and 
modularity of libraries; Python also is more easily taken up by adult 
programmers who already know C or a similar Algol-style language because 
of its Algol-like syntax and also because you can use familiar 
text-oriented tools like emacs or vi or Scite with it (which makes it 
easier for it to gain commercial acceptance as a new thing); Python code 
is clear and concise and maintainable because of the decision to use 
significant indentation instead of braces or brackets (like Occam); Python 
also is a standard defined by a reference implementation, which is much 
better than a standard defined by an ambiguous or incomplete textual 
specification; Python is easier to do small projects in for people who 
only know a little of the language, so in that sense it has an easier 
learning curve as a system.

I feel, especially with Ruby's increasing popularity [as effectively a 
Smalltalk with Algol syntax plus some other bells and whistles], that the 
*themes* in Smalltalk are the future of most programming. Even Python 
continues to get more Smalltalk-like, such as the "new classes" changes. 
Yet, I want to write some programs now, as part of a free and secure 
ecosystem of such programs. :-) Ironically, in my own case as a typical 
Smalltalk programmer, because of my own history as a Smalltalk developer 
working on commercial projects with commercial versions which nonetheless 
included source as most Smalltalks do, I am in some ways "contaminated" by 
that experience and the current overly broad reading of copyright and that 
puts into potential question anything I develop which is a 
Smalltalk-derivative (unless I do it very, very carefully, say by using 
mostly GNU Smalltalk sources); not to say I ever would use such commercial 
code, just that I might face the effectively impossible task of proving I 
had not if there was any coincidental similarity at all (which is a much 
smaller problem when I am working with something very different like Python).

If I perhaps oversimplify, essentially the choice right now is between 
elegant syntax, uniform abstractions, and powerful tools, embodied in a 
system originally designed for kids by big corporate R&D (Smalltalk) 
versus practical syntax, uniform community history of freedom, and 
powerful economic forces, embodied in a system originally designed for 
adult programmers by an academic researcher as a hobby project which grew 
beyond initial expectations (Python). :-)

Both languages along with their communities have different strengths and 
weaknesses, and also both have subcultures which are in opposition to the 
main (e.g. mostly commercial Smalltalk has several free versions, mostly 
free Python has heavy proprietary commercial usage where no doubt such 
users have large interesting and yet proprietary libraries). That the 
strengths and weaknesses are so different in different areas and that one 
must also assess where trends are heading when embarking on big projects 
is why I am in conflict about which to use (especially for writing 
educational simulations), and that is why I tried to mix the best features 
of the two in the PataPata experiment -- though perhaps ended up with the 
worst features of the two in some ways (Smalltalk's . :-).

Barring moving that PataPata project forward somehow, I am left with a 
situation that I either have to put a lot of work into a free Smalltalk 
(Squeak, GNU, A Little Smalltalk, Bistro, Sharp Smalltalk, etc.) to make 
it more to my liking (e.g. mainstream widgets for Squeak, build tools for 
GST or Bistro, etc.) or I have can use Python + GTK or wxWidgets or Jython 
+ Swing out of the box, and just accept greater maintenance issues down 
the road (e.g. debugging and modifying a running program is so easy in 
Smalltalk, in Python it doesn't quite work right, even with tools I have 
built to make it easier [posted to the Jython list]). While I haven't made 
a big point of it, in the past, my choice of Python in the past has also 
been motivated by the "contamination" issue I mentioned above as well. It 
may well be the deciding factor once again, sadly -- ironic to not be able 
to use and improve a wonderful thing you have experienced precisely 
because you have experienced it.(*) :-(

Happy Solstice.

--Paul Fernhout
(*) Note: most people may not be as concerned about such a theoretical 
"contamination" issue as I am, since obviously this is a major problem for 
almost all Squeakers, and most likely for all the major developers on that 
project. And, on a practical point, I can Agree with Alan Kay who 
maintains that most copyright issues are not settled by any sort of logic 
(more by jury emotion in reaction to vague or inconsistent laws) and so 
there is at least some justification for ignoring *potential* problems 
related to the edge of copyright. Still, I feel better avoiding even the 
appearance of potential controversy of that sort (I navigate too many 
oceans of controversy of other sorts, e.g. unschooling, transcending war 
through sustainable development, designing self-replicating space 
habitats, returning to a a gift economy, etc.. :-)

More information about the Edu-sig mailing list