Navigation:  Tutorials > Beginners Guide to Smalltalk > Objects and Messages >

Message Selectors are Symbols

Previous pageReturn to chapter overviewNext page

We mentioned previously that, in Smalltalk, everything is an object. This also goes for message selectors; they are objects too. In fact, they are examples of a certain class of object called Symbols. Symbols are similar to text string objects except that they are prepended with a # sign rather than being enclosed in single quotes. The following are all examples of literal Symbols.

#show
#at:put:
#add:

Symbols cannot contain spaces.

The important thing about Symbols is that they are unique. The important thing to remember is that message selectors are, in fact, Symbols. For this reason, they are usually written as being prepended by a #. This will be the convention used from this point on in this guide.