Skip to content Skip to navigation

Connexions

You are here: Home » Content » What makes Smalltalk different?

Navigation

Recently Viewed

This feature requires Javascript to be enabled.
 

What makes Smalltalk different?

Module by: Hannes Hirzel. E-mail the author

Summary: This modules explains what is different about the Smalltalk programming environment. A Smalltalk environment consists of objects which work together as a system by sending messages to each other. The net of objects is saved when you exit the environment and reloaded when you restart it.

Learning Smalltalk

Question

I want to learn Smalltalk but without the baggage of an IDE. Just let me use my favorite text editor, that's much easier.

Answer

Bert Freudenberg: It is not helpful to learn Smalltalk as just another language. You would be missing the point entirely.

Smalltalk's graphical environment is not just an IDE. The core of the system is simply objects. The interface provides various ways to create objects and interact with them. The language is just a convenient way to create messages to the objects. It is secondary to the objects themselves.

In other OO languages, you write your program, then you run it, which creates objects in memory. Not so in Smalltalk. You create objects in memory (e.g. class objects) and then send messages to e.g. add methods. But a class object is only created once, not every time you "run your program".

The 'program'

There is no such thing as "your program", in fact. There is no "main". It's just a world of objects, some longer-lived, some temporary. In fact, in the system there are objects that were created 30 years ago. Literally. The objects are just frozen to disk as a memory dump (a file which we call "image") and unfrozen later (possibly on a different machine).

The Smalltalk 'image'

The image, the world of objects, is the primary artifact in Smalltalk. There is a sources file, yes, but that's just a database of text snippets to not take up so much RAM. You cannot edit this file by hand (objects in the image use absolute file offsets into the sources file). You cannot re-create the system from the sources file - the system was bootstrapped a long time ago and from then on only modified.

Manipulating objects in the IDE

It's true that superficially the Smalltalk GUI looks just like another IDE. No coincidence - Eclipse was originally written by Smalltalkers in Smalltalk. But there is the crucial difference that in regular IDEs you just manipulate text files. A text editor is a valid alternative for that. In Smalltalk, the GUI manipulates objects in memory. A text editor can not do that.

And as for what Smalltalk to use, I would recommend Squeak (www.squeak.org). Very friendly community, very nice environment, and subscribing to the original Smalltalk vision of creating a great personal computing environment for everyone. For other implementations see www.world.st.

Acknowlegment

This text is by Bert Freudenberg (http://lists.squeakfoundation.org/pipermail/beginners/2011-November/008070.html); used with permission; minor adaption.

Content actions

Download module as:

PDF | EPUB (?)

What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks