Catalog / Smalltalk Cheatsheet
Smalltalk Cheatsheet
A concise reference for Smalltalk syntax, core concepts, and common idioms, designed to assist both beginners and experienced developers.
Core Syntax & Concepts
Basic Syntax
Message Sending (Method Call) |
|
Assignment |
|
Blocks (Anonymous Functions) |
|
Return |
|
Comments |
|
Cascading |
|
Literals
Integers |
|
Floating-Point Numbers |
|
Characters |
|
Strings |
|
Symbols |
|
Arrays |
|
Keywords
|
Control Structures
Conditional Statements
If True |
|
If False |
|
If True: Else: |
|
Boolean Logic |
|
Loops
While True |
|
While False |
|
Times Repeat |
|
Integer to:do: |
|
Collection do: |
|
Collections
Common Collection Operations
Adding elements |
|
Removing elements |
|
Checking for element existence |
|
Getting the size |
|
Testing if empty |
|
Iterating |
|
Specific Collection Types
Arrays |
|
Dictionaries |
|
Sets |
|
Ordered Collections |
|
Classes and Objects
Defining a Class
|
Instance variables are declared within the |
Methods
Instance Method Definition:
Class Method Definition:
|
Method categories help organize methods within a class definition. |
Object Creation
|
Often, the |