links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Last updated at 8:35 am UTC on 23 January 2007
Slang is a language that rolls up its sleeves, spits on its hands, and goes to work. –Carl Sandburg, poet and biographer (1878-1967)
Slang is a small language with a Smalltalk syntax. It can be easily translated to C source code. Slang is used to store the Squeak VM code inside of Squeak. See the methods in classes such as Interpreter for examples of Slang code.

Also, see Back to the Future article for information about why Squeak's VM is constructed this way. In short, it lets you develop the VM at the Smalltalk level, and then when you have it finished, translate it to C to get a large speed increase. See The Squeak Virtual Machine for information about running the VM in Squeak.

The term was coined by Frank Zdybel during an Interval lunch at Swagat in Palo Alto in 1997. (verified by Craig Latta, who was at the lunch).

The Slang language itself is a subset of Smalltalk, and is described in the Back to the Future article mentioned above. Slang is essentially C with a Smalltalk syntax. Slang does not have blocks (except for a few control structures), message sending or even objects. dispatchOn:in: is mapped to a C switch{} statement specially to make the interpreter efficient.

The operations available in Slang are:

"&" "|" and: or: not
"+" "-" "//" "\\" min: max:
bitAnd: bitOr: bitXor: bitShift:
"<" "<=" "=" ">" ">=" "~=" "=="
isNil notNil
whileTrue: whileFalse: to:do: to:by:do:
ifTrue: ifFalse: ifTrue:ifFalse: ifFalse:ifTrue:
at: at:put:
<< >> bitInvert32 preIncrement integerValueOf:
integerObjectOf: isIntegerObject:

Note that Slang is unrelated to S-Lang (http://www.s-lang.org/)