Next: The syntax, Previous: Behind the scenes, Up: Tutorial
The question is always how far to go in one document. At this point, you know how to create classes. You know how to use inheritance, polymorphism, and the basic storage management mechanisms of Smalltalk. You’ve also seen a sampling of Smalltalk’s powerful classes. The rest of this chapter simply points out areas for further study; perhaps a newer version of this document might cover these in further chapters.
Lots of experience can be gained by looking at the source code for system methods; all of them are visible: data structure classes, the innards of the magic that makes classes be themselves objects and have a class, a compiler written in Smalltalk itself, the classes that implement the Smalltalk GUI and those that wrap sockets.
We’ve seen Array, ByteArray, Dictionary, Set, and the various streams. You’ll want to look at the Bag, OrderedCollection, and SortedCollection classes. For special purposes, you’ll want to examine the CObject and CType hierarchies.
GNU Smalltalk has support for non-preemptive multiple threads of execution. The state is embodied in a Process class object; you’ll also want to look at the Semaphore and ProcessorScheduler class.
GNU Smalltalk is implemented as a virtual instruction
set. By invoking GNU Smalltalk with the -D
option, you can
view the byte opcodes which are generated as files on the
command line are loaded. Similarly, running GNU Smalltalk
with -E
will trace the execution of instructions in your
methods.
You can look at the GNU Smalltalk source to gain more information on the instruction set. With a few modifications, it is based on the set described in the canonical book from two of the original designers of Smalltalk: Smalltalk-80: The Language and its Implementation, by Adele Goldberg and David Robson.
The Usenet comp.lang.smalltalk newsgroup is read by many people with a great deal of Smalltalk experience. There are several commercial Smalltalk implementations; you can buy support for these, though it isn’t cheap. For the GNU Smalltalk system in particular, you can try the mailing list at:
No guarantees, but the subscribers will surely do their best!
Next: The syntax, Previous: Behind the scenes, Up: Tutorial