The "Unknown:"s below indicate that an entry is incomplete.
| [ ... ](1) | block (grouping statements, especially when statements are not expressions) |
| nothing needed | breaking lines (useful when end-of-line and/or indentation has a special meaning) |
| " ... " | commenting (non nestable) |
| < > <= >= | comparison |
| min / max | comparison (min / max (binary or more)) |
| compare | comparison (returns 3 values (i.e. inferior, equal or superior)) |
| someClass comment: '...' | documentation comment |
| = ~= | equality / inequality (deep) |
| == ~~ | equality / inequality (shallow) |
| Smalltalk garbageCollect | force garbage collection |
| ( ... ) | grouping expressions |
| thisContext lineNumber / thisContext method source | information about the current line and file |
| Compiler evaluate: | runtime evaluation |
| case-sensitive | tokens (case-sensitivity (keywords, variable identifiers...)) |
| [a-zA-Z][a-zA-Z0-9]* | tokens (variable identifier regexp) |
| CamelCase or camelCase | tokens (what is the standard way for scrunching together multiple words) |
| := | variable assignment or declaration (assignment) |
| | v1 v2 | | variable assignment or declaration (declaration) |
| [:a :b| ... ] | anonymous function |
| f value(2) | function call (with no parameter) |
| doesNotUnderstand | function called when a function is not defined (in dynamic languages) |
| f ... or f: para1 ... | function definition |
| ^ | function return value (breaks the control flow) |
| yourself | identity function |
| thisContext sender | runtime inspecting the caller information |
Unknown:
function call
| ^ | breaking control flow (returning a value) |
| a on: exception_name do: [:exn | ...] | exception (catching) |
| ifCurtailed | exception (catching) |
| ensure | exception (cleanup: code executed before leaving) |
| resume | exception (resume execution where the exception took place) |
| retry | exception (retrying: after catching an exception, tell the snippet to be re-run) |
| signal | exception (throwing) |
| c ifTrue: ... | if_then |
| c ifTrue: b1 ifFalse: b2 | if_then_else |
| ifFalse | ifnot_then (unless) |
| [...] whileFalse: [c] | loop (do something until condition) |
| 1 to: 10 by: -1 do: [...] | loop (for each value in a numeric range, 1 decrement) |
| 1 to: 10 do: [...] | loop (for each value in a numeric range, 1 increment (see also the entries about ranges)) |
| 1 to: 10 by: 2 do: [...] | loop (for each value in a numeric range, free increment) |
| c whileTrue: ... | loop (while condition do something) |
| . | sequence |
| super | accessing parent method |
| subclass | class declaration |
| self | current instance |
| class | get the type/class corresponding to an object/instance/value |
| respondsTo | has the method |
| parent subclass: child | inheritance |
| object method: para1 method_continuation: para2 | method invocation |
| object method | method invocation (with no parameter) |
| o class selectors / o class allSelectors | methods available |
| clone / copy or deepCopy | object cloning |
| class_name new | object creation |
| isKindOf(3) | testing class membership |
| at(4) | accessing n-th character |
| Character value: c | ascii to character |
| $z | character "z" |
| asciiValue | character to ascii |
| Character | character type name |
| asString | convert something to a string (see also string interpolation) |
| printString | convert something to a string (see also string interpolation) |
| s copyFrom: n to: m | extract a substring |
| indexOfString | locate a substring |
| lastIndexOfString | locate a substring (starting at the end) |
| all strings allow multi-line strings | multi-line |
| storeBinaryOn | serialize (marshalling) |
| printOn | simple print (on any objects) |
| show | simple print (on strings) |
| expandMacrosWith(5) | sprintf-like |
| , | string concatenation |
| = ~= | string equality & inequality |
| size | string size |
| <N>(6) | strings (end-of-line (without writing the real CR or LF character)) |
| '...' | strings (with no interpolation of variables) |
| String | type name |
| readBinaryFrom | unserialize (un-marshalling) |
| asLowercase / asUppercase | upper / lower case character |
| asLowercase / asUppercase / asUppercaseFirst | uppercase / lowercase / capitalized string |
| false | false value |
| not(7) | logical not |
| | / & | logical or / and (non short circuit (always evaluates both arguments)) |
| or / and | logical or / and (short circuit) |
| true | true value |
| Boolean | type name |
| a add: e beforeIndex: i / a add: e afterIndex: i | adding an element at index (side-effect) |
| addFirst | adding an element at the beginning (list cons) (side-effect) |
| add | adding an element at the end (side-effect) |
| allButFirst | all but the first element |
| inject into | f(... f(f(init, e1), e2) ..., en) |
| detect | find an element |
| first | first element |
| do | for each element do something |
| removeFirst | get the first element and remove it |
| removeLast | get the last element and remove it |
| includes | is an element in the list |
| anySatisfy | is the predicate true for an element |
| allSatisfy | is the predicate true for every element |
| l asStringWith: s | join a list of strings in a string using a glue string |
| select | keep elements (matching) |
| last | last element |
| , | list concatenation |
| #(a b c)(8) | list constructor |
| asArray | list out of a bag |
| size | list size |
| at(9) | list/array indexing |
| reversed | reverse |
| min / max | smallest / biggest element |
| sortBy | sort |
| collect | transform a list (or bag) in another one |
| l1 with: l2 collect: ... | transform two lists in parallel |
| Array or OrderedCollection | type name |
| {a} | computable tuple (these are a kind of immutable lists playing a special role in parameter passing) (1-uple) |
| {} | computable tuple (these are a kind of immutable lists playing a special role in parameter passing) (empty tuple) |
| #() | computable tuple (these are a kind of immutable lists playing a special role in parameter passing) (empty tuple) |
| at | dictionary (access: read) |
| h at: k put: o | dictionary (access: write) |
| includesKey | dictionary (has the key ?) |
| keys | dictionary (list of keys) |
| values | dictionary (list of values) |
| removeKey | dictionary (remove by key) |
| Dictionary | dictionary (type name) |
| nil | optional value (null value) |
| v | optional value (value) |
| to | range (inclusive .. inclusive) |
| normal function call | record (selector) |
| { a. b. c } | tuple constructor |
Unknown:
optional value (null coalescing)
record (type declaration)
union type declaration
enumerated type declaration
| + / - / * / / | addition / subtraction / multiplication / division |
| bitAnd / bitOr / bitXor | bitwise operators (and / or / xor) |
| bitInvert | bitwise operators (bitwise inversion) |
| bitShift | bitwise operators (left shift / right shift / unsigned right shift) |
| raisedTo | exponentiation (power) |
| log: 10 | logarithm (base 10) |
| ln | logarithm (base e) |
| rem | modulo (modulo of -3 / 2 is -1) |
| \\ | modulo (modulo of -3 / 2 is 1) |
| - | negation |
| 1000.0, 1E3 | numbers syntax (floating point) |
| 2r1, 8r7, 16rf | numbers syntax (integers in base 2, octal and hexadecimal) |
| 1000 | numbers syntax (integers) |
| same priorities | operator priorities and associativities (addition vs multiplication) |
| Random new nextInteger | random (random number) |
| Random new setSeed | random (seed the pseudo random generator) |
| sqrt / exp / abs | square root / e-exponential / absolute value |
| sin / cos / tan | trigonometry (basic) |
| arcSin / arcCos / arcTan | trigonometry (inverse) |
| / rounded / floor / ceiling | truncate / round / floor / ceil |
| Float, Double, Fraction, FixedPoint | type name (floating point) |
| Integer, SmallInteger, LargeInteger | type name (integers) |
| p priority: n | Thread Prioritization (Changing Thead Priority) |
| SharedQueue, Semaphore critical: [...], Future, LazyValue | Thread Synchronization (Defining a Synchronized Shared Resource) |
| use messages, parameters or shared variables(10) | passing data directly between threads |
| resume / suspend / terminate | starting / stopping threads |
| p := [ ... ] newProcess. | thread object creation |
| p := [ ... ] fork.(11) | thread object creation |
