cs173: Essay 1

Alan Kay, Adele Goldberg and many others inspired the development of Smalltalk at Xerox PARC and other organizations in the 1970s and 1980s. In addition to seeing extensive use in industry, as well as winning the hearts of many programmers, Smalltalk is important from a historical perspective. Happily, Smalltalk still lives, especially in the guise of an implementation called Squeak that was initially built at Disney. (Disney. Small talk. Squeak. Get it?)

Dwight Hughes has kindly put several important historical documents about Smalltalk on the Web. We will use one of these as our primary source for this assignment, but you may want to read through many or all of them to develop perspective on both the language and its milieu. (In particular, between this Web site and our libraries, we won't accept excuses of the form "I couldn't find out anything about Smalltalk to write an informed response".)

The article we will focus on is Design Principles Behind Smalltalk by Dan Ingalls. This article appeared in BYTE magazine (back when it was still more hobbyist and less corporate).

Ingalls's article is interesting from several viewpoints. First, it is a model that programming language designers would do well to emulate: to set down in crisp prose the principles that guided the design of their language. Second, it offers us a snapshot of thinking about programming languages two decades ago. Third, it employs perhaps a remarkable degree of anthropomorphism in discussing the man-machine intercourse. And finally, it tells us a good deal about Smalltalk itself.

Note: You must be careful in any exercise like this, because words change meaning over time. For instance, the term "polymorphism" may have meant something different to Ingalls than it might to you (did it?). Be sure you understand what he meant, rather than naively imposing your meaning. Also, the essay was written before the modern personal computer had made its debut, so its authors lived in a fairly different world. (Indeed, IBM released its PC on August 12, 1981 — the very month this issue appeared in BYTE.) Likewise, the Internet was still a fledgling. One should therefore not be surprised that, for instance, Java offers support for XML whereas Smalltalk did not; this is not worth writing home about. In short, keep in mind when Ingalls wrote his essays.

In this assignment, we will contrast Ingalls's essay — and, by extension, Smalltalk itself — with what we know about computer science, and in particular with Java. You have two tasks:

  1. First, you need to take a position on whether or not Java represents a significant advance over Smalltalk. Your comparison should stick to technical points: the backing of a corporate sponsor is not relevant here (nor is Java's current popularity, given that at one time Smalltalk also was pretty popular). Having taken that position, you must argue it cogently.
  2. (Briefly:) Even if you decide Java is substantially better, there is no question that Smalltalk was a significant achievement. Just think: all that, over twenty years ago! So what happened? Many people in the Lisp community point to similar accomplishments, but Lisp suffered from two fatal dependencies: on AI (which went south in the mid-1980s) and on heavy-metal hardware. In contrast, as far back as 1976, Ingalls says, "Dear to our hearts is the ability to run Smalltalk on personal computers" (he means, of course, the Xerox PARC kind). Given all that, try to understand and explain why Smalltalk failed to gain widespread use, even as object-oriented programming succeeded. Is Ingalls's final principle ("Natural Selection") flawed, or is it perhaps valid (and his work is hoist on its own petard)?
To help you along, we have highlighted several comments from Ingalls's essay, each followed by some comments and questions meant to provoke your thought. You can use as many of these as you wish to make your case. You are also welcome to ignore these and/or to supplement them with additional findings of your own. Your final essay must be two pages long, with the majority of space dedicated to the first task listed above. (Be sure to cite all your sources! Don't run afoul of the academic honesty policy.)

Possible Points for Discussion

Each of the following is an excerpt from Ingalls followed by some remarks about it. The text quoted here is only meant to be an index; you will need to read the essay for context.

A system should be built with a minimum set of unchangeable parts ...
Ingalls provides an informal definition of what such parts are. Contrast the size of the "set of unchangeable parts" for Smalltalk and for Java. If Java's set is much smaller, how was it able to accomplish that? If Java's set is bigger, then doesn't this violate Ingalls's claims about well-designed languages? Clearly programmers are able to build moderately-sized applications in Java; will they be unable to build large ones, or is Ingalls just wrong?

To be truly "object-oriented", a computer system must provide automatic storage management.
C++ is notorious for proclaiming itself as "object-oriented", yet not providing full-blown automated storage management. (Neither did Smalltalk-76, as you'll find out if you read Ingalls's document on it carefully. Yet in the 1981 article, Ingalls makes no compromises.) So is C++ object-oriented? Can you refute Ingalls's argument?

Let us consider the process of adding 5 to a number. In most computer systems, the compiler figures out what kind of number it is and generates code to add 5 to it. ...
Yet as you have seen in demonstrations of Scheme, it is possible to employ generic arithmetic, even though Scheme is by no means "sending messages". Does the Scheme example refute Ingalls?

Instead of a bit-grinding processor raping and plundering data structures, we have a universe of well-behaved objects that courteously ask each other to carry out their various desires.
Let's take this human metaphor a bit further. Human communication is notoriously polyphonic, so lots of people might as you to execute tasks at the same time. Is this a problem Ingalls needs to contend with? And if so, what does he have to say (in any of his essays) about it?

No component in a complex system should depend on the internal details of any other component.
A common way in which many programming languages guard against dependencies on internal details is to erect a type system (for a good example, consider Java's). If this is such an important design principle, and types are such a good way of ensuring this, why does Smalltalk eschew it? (They certainly knew about types!)

Each independent component in a system would appear in only one place.
Does Java satisfy this principle? Can you think back to programs you have written where you have found Java's abstraction capabilities lacking?

When a system is well factored, great leverage is available to users and implementers alike.
Is Java's factoring better or worse than Smalltalk's?

Every component accessible to the user should be able to present itself in a meaningful way for observation and manipulation.
Arguably, this principle is at the heart of Java Beans (and succesor technologies). But given that Java is already object-oriented, why did it need a separate technology to provide this capability?

An operating system is a collection of things that don't fit into a language. There shouldn't be one.
Clearly, Java also has a strong view on this topic. Are there any interesting differences, and if so, whom do they favor?