Smalltalk is a dynamically typed object oriented programming language designed at Xerox PARC by Alan Kay, Dan Ingalls, Ted Kaehler, Adele Goldberg, and others during the 1970s. The language was generally released as Smalltalk-80 and has been widely used since. Smalltalk is in continuing active development, and has gathered a loyal community of users around it.
Smalltalk has been a great influence on the development of many other computer languages, including: Objective-C, Actor, Java and Ruby (the latter one to such an extent that many Smalltalkers consider Ruby to be Smalltalk with a different syntax). Many software development ideas of the 1990s came from the Smalltalk community, such as design patterns (as applied to software), Extreme Programming and refactoring. Among Smalltalkers is Ward Cunningham, the inventor of the WikiWiki concept.
Table of contents
Smalltalk's big ideas
Smalltalk's big ideas include:
- "Everything is an object." Strings, integers, booleans, class definitions, blocks of code, stack frames, memory are all represented as objects. Execution consists of sending messages between objects. Any message can be sent to any object; the receiver object determines whether this message is approprate and what to do to process it.
- Everything is available for modification. If you want to change the IDE, you can do it-- in a running system, without stopping to recompile and restart. If you want a new control construct in the language, you can add it. In some implementations, you can change even the syntax of the language, or the way the garbage collection works.
- Types are dynamic -- this means that you don't have to define types in the code which makes the language much more concise. (As explained above, it is the receiver object rather than the compiler that decides whether an operation is appropriate).
- Model-view-controller (MVC) pattern for structuring user interfaces.
- Dynamic translation: modern commercial virtual machines compile bytecodes to the native machine code for fast execution, a technique pioneered by Smalltalk-80 from ParcPlace Systems in mid-1980s. This idea was adopted by Java some ten years later and named "Just-in-time compilation", or JIT.
- Garbage collection is built in and invisible to the developer.
- Smalltalk programs are usually compiled to bytecodes, run by a virtual machine, which allows them to be executable on any hardware platform for which a VM is available.
- sending a message to an object;
- assigning an object to a variable;
- returning an object from a method;
Smalltalk was invented by a group of researches led by Alan Kay at XEROX Palo Alto Research Center. The first implementation, known as Smalltalk-71, was created in a few mornings on a bet that a programming language based on the idea of message passing inspired by Simula could be implemented in "a page of code". A later version actually used for research work is now known as Smalltalk-72. Its syntax and execution model were very different from modern Smalltalk, so much so that it could be considered a different language.
After significant revisions which froze some aspects of executional semantics to gain performance, the version known as Smalltalk-76 was created. This version added inheritance, featured syntax much closer to Smalltalk-80, and had a development environment featuring most of the tools now familiar to Smalltalkers.
Smalltalk-80 added meta-classes, something which helps keep the "everything is a object" statement true by associating properties and behavior with individual classes (for example, to support different ways of creating instances). Smalltalk-80 was the first version made available outside of PARC, first as Smalltalk-80 Version 1, given to a small number of companies and universities for "peer review". Later (in 1983) a general availability implementation, known as Smalltalk-80 Version 2, was released as an image (platform-independent file with object definitions) and a virtual machine specification.
Two of the currently popular Smalltalk implementations are descendants of those original Smalltalk-80 images. Squeak is derived from Smalltalk-80 Version 1 by way of Apple Smalltalk. VisualWorks is derived from Smalltalk-80 version 2 by way of Smalltalk-80 2.5 and ObjectWorks (both products of ParcPlace Systems, XEROX PARC spin-off company formed to bring Smalltalk to the market). As an interesting link between generations, here is a screenshot of Smalltalk-80 version 2 image running on Hobbes, a Smalltalk-80 VM implemented in VisualWorks.
- VisualWorks, see Cincom Smalltalk website, Wiki.
- IBM's VisualAge for Smalltalk, see http://www-4.ibm.com/software/ad/smalltalk/
- Dolphin Smalltalk, see http://www.object-arts.com/Home.htm
- Smalltalk/X, see http://www.exept.de/sites/exept/english/Smalltalk/frame_uebersicht.html
- Squeak, see http://www.squeak.org/
- Pocket Smalltalk which runs on a Palm Pilot, see http://www.pocketsmalltalk.com/
- GNU Smalltalk, see http://www.gnu.org/software/smalltalk/smalltalk.html
- Smalltalk MT, see http://www.objectconnect.com/
- There are WikiWiki implemented in Squeak Smalltalk (swiki) and VisualWorks (WikiWorks). You can download Swiki from http://minnow.cc.gatech.edu/swiki WikiWorks is included in VisualWorks distribution (available for free for non-commercial use, see the link above).