Smalltalk

Smalltalk is a dynamically typed message passing language. It is unique due to syntax and object oriented features. It is generally interpreted but is often compiled to a bytecode first.

Example Code

Here is an example of the 100 doors problem:

doors := [ :count |
	"Initialize the array of doors to 0 (closed)"
	a := Array new: count withAll: false.

	"Process the doors"
	a withIndexDo: [ :each :index |
		index to: (a size) by: index do: [:this |
			a at: this put: (a at: this) not
		]
	].

	"Print out the results"
	1 to: count do:
		[ :n |
		Transcript 
			show: 'Door #', n, ' is ';
			show: ((doors at: door) ifTrue: [#open] ifFalse: [#closed]);
			show: '.';
			cr]
].

doors value: 100.

Why would I learn this language?

Smalltalk is a powerful environment for exploring many different elements of computer programming, including rich media such as audio and user interfaces. Smalltalk code is generally concise and easily readable due to its message based syntax.

Smalltalk provides an integrated code browser and debugger which are incredibly powerful and easy to use. This makes Smalltalk a highly productive environment where code can be modified and fixed in the running application.

Starting Points

Pharo Open Source Smalltalk
Pharo is a clean, innovative, open-source Smalltalk environment available for many platforms.
The World of Smalltalk
An up-to-date collection of Smalltalk related information
Learning Smalltalk
A set of resources for learning about Smalltalk
Squeakland: home of squeak etoys
Etoys is an educational tool for teaching children programming with examples from other academic fields.
Introduction to Squeak
A set of resources for learning about Smalltalk programming in the Squeak environment.

Further Reading