The script shape in Julia
The smallest Julia: bindings and println, no ceremony at all.
# A script runs top to bottom; println writes a line.
observatory = "Ridgeline Dome"
println("Opening $observatory")
println("Clear-sky hours tonight: ", 4 + 3)
How it works
- A script runs top to bottom; no main function is required.
printlnwrites a line; extra arguments concatenate.$observatoryinterpolates straight into the string.
The run, in numbers
- Lines
- 4
- Characters to type
- 160
- Tokens
- 23
- Three-star pace
- 75 tpm
At the three-star pace of 75 tokens a minute, this run takes about 18 seconds.
Step 1 of 3 in Values, step 1 of 27 in Language basics.