The History and Technical Side Of Smalltalk
In this section, we will try to give a brief introduction to the history of Smalltalk and to the methods by which Smalltalk successfully implemented the object-oriented paradigm and solved the computer control problems discussed earlier. As the first OOP language to achieve a significant amount of popluarity, Smalltalk presents an important example of the success of OOP langauges to solve the problems associated with modern approaches to computers.
A team headed by programming pioneer Alan Kay developed the language of Smalltalk at Xerox PARC between 1971 and 1980.
Smalltalk was not a brand new creation, but rather an improvement on a relatively obscure language called SIMULA or SIMULA 67, developed in the early nineteen-sixties in Scandinavia by a Ole-Johan Dahl and Kristen Nygaard. SIMULA, which itself was an extension of ALGOL and FORTRAN, represented the first object-oriented programming language. It was intended as a tool for creating computer simulations. Consequently, the object-oriented paradigm, which modeled the interactions between real objects, see med to be the most instinctive one for it. [SEE : HOW OOP PROGRAMMERS THINK]
Throughout the seventies, the Xerox Palo Alto Research Center (Xerox PARC) worked on concepts for programming personal computers that would enable more people, besides experienced programmers, to create useful and complex programming applications. In fact, one of Kay’s ideas was to write a language with minimal syntax rules that would be simple enough to allow children to program. In order to do this, he decided to use the OOP-based SIMULA to create an iconic interface, which would allow programmers to create complete, sophisticated objects by describing the way they would function and interact with other objects in the program.
Smalltalk's first large-scale use was as the operating system on the Xerox Dynabook, later known as ALTO. However, the use of Smalltalk was not confined to Xerox projects, and when Alan Kay left Xerox Park for Apple, many of the ideas he had been work ing on, including the iconic Smalltalk interface, found their way into the Macintosh and Apple Powerbook OS designs (Pletzke, pp. 6-8)
The initial idea of simple syntax persisted through all of the versions of Smalltalk, and even current Smalltalk has a syntax sufficiently compact to fit on a single page. However, as the language grew, the library classes that provide pre-fabricated objects have become increasingly complex. As Jonathan Pletzke notes, "Learning the Smalltalk syntax takes one day. Learning the Smalltalk class library takes a lifetime."
Byte magazine gave Smalltalk and object-oriented programming in general an important publicity boost when, in August of 1981, it devoted an entire issue to Smalltalk. In this issue, the editors discussed ideas regarding regarding the effectiveness and feasibility of object-oriented programming. Programming specialists, who were already searching for powerful solutions to rising dilemmas in software creation, responded well to these ideas. OOP gained prominence in the programming language market soo n thereafter, with the introduction of C++ in 1984 and CLOS (the OOP version of McCarthy’s LISP) in 1988.
Perhaps the most distinctive feature of Smalltalk was its unique integration with its Integrated Development Environment (IDE). The IDE includes the editor, the linker, and the compiler in a united package, which permits users to concentrate on writin g programs, rather than switching between editor and compiler applications. The IDE supports the object-oriented paradigm, and is itself written in Smalltalk to make it amenable to user customization. Pursuing Alan Kay’s policy of iconization, the envir onment allows users to state that a certain action needs to occur in the program simply by clicking on an object in the IDE and selecting the appropriate message that needs to be sent to that object. The convenience of the Smalltalk programming environme nt is the primary reason why Smalltalk became the first practically popular OOP language.
The Smalltalk language itself is strictly object-oriented, which means that unlike C++, which supports other paradigms (largely for backwards compatibility with C), Smalltalk is a purely OOP language. Furthermore, Smalltalk is loosely typed, fully dyn amic language. This means that the types of variables are determined at run-time, not compile-time, and the message-to-method resolution occurs at run-time as well, making true polymorphism possible. Each Smalltalk class consists of instance methods and instance variables, which are inherited by each of the objects belonging to that class, and class methods and instances, which exist once for the whole class. Commands are invoked by sending a message and its argument to an object.
Smalltalk classes are organized into class hierarchies, with each class having exactly one superclass (single inheritance), but multiple subclasses. When an object receives a message, its class is searched for a method definition. If the definition i s not found, the search continues in the superclass and on through the hierarchy. Instances of classes are dynamically created via the new operator. Everything, even the classes and programs themselves, are objects in Smalltalk (Pletzke, p. 26). Each class is an object of the root class (appropriately titled Object). Therefore, the Smalltalk program is best viewed as data rather than code, and it is in fact necessary to send a block a special value message in order to execute it (Kaehler and Patterson, p. 132).
Smalltalk is, consequently, a fully object-oriented, loosely typed, dynamic language. Its syntax is simple, but its large libraries and the possibility of adding new classes and libraries to suite the programmers needs make it quite powerful. By succ essfully incorporating the object-oriented paradigm into a convenient IDE, Smalltalk was able to satisfy the demands of professional programmers and enthusiasts alike.
References:
Ted Kaehler and Dave Patterson, A Taste of Smalltalk, W. W. Norton and Company, New York, 1986
Lewis Pinson and Richard Wiener, And Introduction to Object Oriented Programming and Smalltalk, Addison-Wesley, 1988
Carlo Ghezzi and Mehdi Jazayeri, Progarmming Language Concepts (3d ed), John Wiley and Sons, New York, 1998
Jonathan Pletzke, Advanced Smalltalk, Wiley Computer Publishing, New York, 1997