typestar

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

  1. A script runs top to bottom; no main function is required.
  2. println writes a line; extra arguments concatenate.
  3. $observatory interpolates 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.

Type this snippet

Step 1 of 3 in Values, step 1 of 27 in Language basics.

Next →

The script shape in other languages