Quick Start Guide

Quick Start Guide

This guide gets you writing Thorn code in under five minutes. It assumes you have already installed Thorn. If not, see the Installation Guide first.


1. Your First Program

Create a file called hello.th:

write("hello world")

Compile and run it:

thorn build hello.th
./hello

You should see hello world printed to the terminal.

2. Variables & Tasks

Variables need no declaration keyword. Tasks are defined with task and return with send.

name = "Thorn"

task greet(n) {
    write(v"hello {n}")
}

greet(name)