Back: GNU Smalltalk User's Guide
Up: GNU Smalltalk User's Guide
Forward: Installation
 
Top: GNU Smalltalk User's Guide
Contents: Table of Contents
Index: Class index
About: About this document

Introduction

GNU Smalltalk is an implementation that closely follows the Smalltalk-80 language as described in the book Smalltalk-80: the Language and its Implementation by Adele Goldberg and David Robson, which will hereinafter be referred to as the Blue Book.

The Smalltalk programming language is an object oriented programming language. This means, for one thing, that when programming you are thinking of not only the data that an object contains, but also of the operations available on that object. The object's data representation capabilities and the operations available on the object are "inseparable"; the set of things that you can do with an object is defined precisely by the set of operations, which Smalltalk calls methods, that are available for that object: each object belongs to a class (a datatype and the set of functions that operate on it) or, better, it is an instance of that class. You cannot even examine the contents of an object from the outside--to an outsider, the object is a black box that has some state and some operations available, but that's all you know: when you want to perform an operation on an object, you can only send it a message, and the object picks up the method that corresponds to that message.

In the Smalltalk language, everything is an object. This includes not only numbers and all data structures, but even classes, methods, pieces of code within a method (blocks or closures), stack frames (contexts), etc. Even if and while structures are implemented as methods sent to particular objects.

Unlike other Smalltalks (including Smalltalk-80), GNU Smalltalk emphasizes Smalltalk's rapid prototyping features rather than the graphical and easy-to-use nature of the programming environment (did you know that the first GUIs ever ran under Smalltalk?). The availability of a large body of system classes, once you master them, makes it pretty easy to write complex programs which are usually a task for the so called scripting languages. Therefore, even though we have a nice GUI environment including a class browser (see section 3.7.1 Blox), the goal of the GNU Smalltalk project is currently to produce a complete system to be used to write your scripts in a clear, aesthetically pleasing, and philosophically appealing programming language.

An example of what can be obtained with Smalltalk in this novel way can be found in 6. Class reference. That part of the manual is entirely generated by a Smalltalk program, starting from the source code for the system classes as distributed together with the system.

I'd like to end this introduction reporting an article I posted to Usenet in September 1999. It's about GNU Smalltalk's `place in the world' and its comparison with another open source Smalltalk, Squeak (a new version of Smalltalk-80 written by lots of people including the great wise behind the original Smalltalk implementation).

Re: GNU Smalltalk and Squeak (was Re: GNU Smalltalk 1.7 development)

I enjoy discussions about the relationship between GNU Smalltalk and Squeak, because I also think about it sometimes. And, believe it or not, I cannot tell which system is more "winning". Actually, they're fundamentally different--the only thing they share is that both are free.

Squeak is Smalltalk for the pure. Smalltalk for die-hard object-oriented folks. Don't flame me please, and interpret this article with the necessary irony and benevolence. Why do I say this? Because only a die-hard object-oriented folk, IMO, would write BitBlt and real-time FM synthesis stuff in Smalltalk--even Adele Goldberg wrote her Smalltalk implementation in Smalltalk mostly for clarity (at least she says so).

GNU Smalltalk is Smalltalk for hacking object-oriented folks. You know them: they like the object-oriented paradigm because it's clearer and powerful, and maybe they learnt something of design too... but they nevertheless like to toy with C and think that only pointers make them feel like they are "really" programming. Why do I say this? Because I am one of them, and proud of it.

Having said so, I must admit that I have Squeak on my hard disk. And I'd be happy if one of the `great wise' behind Squeak told me he dignated himself to have a look at my humble creation. Because both do have good points. Let's take a bird's fly on them... Squeak had LargeIntegers ever since it was born, I added them three months ago to a ten-year old GST. Squeak has Namespaces and I already confessed that I'm taking inspiration from them. But GST has closures, it has a better compiler, better C interoperability, and (I beg your pardon Squeakers) an easy to use window framework.

I added closures to GST in three days of work without taking extra caffeine; the Squeak Mailing List has been wondering for two years about when they will be finally there. Having to choose between 1000 downloads a day and Dan Ingalls adding closures to Squeak after peeping at my source code, I'd surely pick the second!!!

Being too loquacious? Probably, so I stop here. The moral is, no civil wars between Smalltalk dialects please; let's all write good programs and let others write good programs. It'll surely be a better world for both.

Paolo Bonzini




This document was generated on May, 12 2002 using texi2html