Skip to content
This repository was archived by the owner on Feb 16, 2025. It is now read-only.

Commit f6b8d3f

Browse files
authored
Merge pull request #215 from SquareBracketAssociates/bencoman-clarify-array-types
Clarify array types
2 parents dbb65cb + 62b7eba commit f6b8d3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SyntaxNutshell/SyntaxNutshell.pillar

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ In Pharo, the angle bracket syntax is also used for method annotations called pr
527527
- There are five kinds of literal objects: numbers (5, 2.5, 1.9e15, 2r111), characters (==$a==), strings (=='hello'==), symbols (==#hello==), and arrays (==#('hello' #hi)== or =={ 1 . 2 . 1 + 2 }== )
528528
- Strings are delimited by single quotes, comments by double quotes. To get a quote inside a string, double it.
529529
- Unlike strings, symbols are guaranteed to be globally unique.
530-
- Use ==#( ... )== to define a literal array. Use =={ ... }== to define a dynamic array. Note that ==#(1+2) size >>> 3==, but =={1+2} size >>> 1==
530+
- Use ==#( ... )== to define a literal array at compile time. Use =={ ... }== to define a dynamic array at runtime. Note that ==#(1+2) size >>> 3==, but =={12+3} size >>> 1==. To observe why, compare ==#(12+3) inspect== and =={1+2} inspect==.
531531
- There are three kinds of messages: unary (e.g., ==1 asString==, ==Array new==), binary (e.g., ==3 \+ 4==, =='hi', ' there'==), and keyword (e.g., =='hi' at: 2 put: $o==)
532532
- A cascaded message send is a sequence of messages sent to the same target, separated by semi-colons: ==OrderedCollection new add: #calvin; add: #hobbes; size >>> 2==
533533
- Local variables are declared with vertical bars. Use ==:= == for assignment. ==\|x\| x := 1 ==

0 commit comments

Comments
 (0)