An ordered set of instructions. It reads input, follows rules, and produces output.
Workspace
Smalltalk
object messaging live environments and classic OOP thinking
Definition first
What Smalltalk means
Smalltalk is a programming language for writing exact instructions, often used for object messaging live environments and classic OOP thinking. Start with one mental model: input goes through steps and becomes output.
main.stRun gst main.stHabit Think in messages sent to objects and inspect state liveA value is data. A variable is the name you use to hold and reuse that data.
A named piece of work. It takes input, does one job, and can return a result.
Pharo or GNU Smalltalk is the place that actually runs code from main.st.
First readable code
Program output
entry point output syntax printNl42 printNl.
Output 42Language lineage
Smalltalk family tree
See where Smalltalk comes from, which languages feel close, and what to learn next.
Zero base path
Question bank
Search before practice
Pick a stage or search across the open programming bank. Jump straight to the matching drill.
Smalltalk practice 1
Smalltalk question 1. Choose the statement that matches printing a value.
Smalltalk practice 2
Smalltalk question 2. Choose the statement that matches naming a value.
Smalltalk practice 3
Smalltalk question 3. Choose the statement that matches reusable function.
Smalltalk practice 4
Smalltalk question 4. Choose the statement that matches basic collection.
Smalltalk practice 5
Smalltalk question 5. Choose the statement that matches printing a value.
Smalltalk practice 6
Smalltalk question 6. Choose the statement that matches naming a value.
Smalltalk practice 7
Smalltalk question 7. Choose the statement that matches reusable function.
Smalltalk practice 8
Smalltalk question 8. Choose the statement that matches basic collection.
Smalltalk practice 9
Smalltalk question 9. Choose the statement that matches printing a value.
Smalltalk practice 10
Smalltalk question 10. Choose the statement that matches naming a value.
Smalltalk practice 11
Smalltalk question 11. Choose the statement that matches reusable function.
Smalltalk practice 12
Smalltalk question 12. Choose the statement that matches basic collection.
Smalltalk practice 13
Smalltalk question 13. Choose the statement that matches printing a value.
Smalltalk practice 14
Smalltalk question 14. Choose the statement that matches naming a value.
Smalltalk practice 15
Smalltalk question 15. Choose the statement that matches reusable function.
Smalltalk practice 16
Smalltalk question 16. Choose the statement that matches basic collection.
Smalltalk practice 17
Smalltalk question 17. Choose the statement that matches printing a value.
Smalltalk practice 18
Smalltalk question 18. Choose the statement that matches naming a value.
Multiple choice
Smalltalk practice 1
Smalltalk question 1. Choose the statement that matches printing a value.
42 printNl.
Reference
Patterns for main.st
gst main.stentry point output syntax printNl
Program output
42 printNl.
- Run the smallest file first
- Print one known value
- Check the output before adding more code
variables assignment types :=
Values and names
| total | total := 42. total printNl.
- Give values readable names
- Keep one idea per line while learning
- Trace the value before changing it
function collection Array
Functions and collections
add := [ :a :b | a + b ]. scores := #(40 2). scores size printNl.
- Keep functions small
- Return useful values
- Use the common collection before reaching for frameworks