Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
symbol literal
Last updated at 11:52 am UTC on 17 January 2006
A symbol literal is shorthand notation for creating an object of the Symbol class.

A symbol literal is specified with a hash sign followed by a character string.

#BB, #456, #methodName

For example, specifying #abc123 is equivalent to specifying Symbol lookup: 'abc123'.

Symbol literals are identity objects. If two symbols are equal they are the same object. For example, #abc123 == (Symbol lookup: 'abc123') is true.

Symbol literals are used to represent names used in the Smalltalk system.