Your First Program — Clean Language
← All tutorials
first-steps3 min

Your First Program

Every journey starts somewhere — and in Clean Language, every program starts with the same thing: a start: block. It's where your code begins running. Think of it like the front door of your program.

Let's write the simplest possible program:

start:
    print("Hello, world!")
Hello, world!

That's it. One block, one line, one result. Clean Language is designed to be readable from the very first line — no semicolons, no curly braces, no mystery.

Now let's make it a little more interesting:

start:
    print("Hello, world!")
    print("Welcome to Clean Language.")
    print("Let's build something together.")
Hello, world!
Welcome to Clean Language.
Let's build something together.

Clean reads your code from top to bottom, one line at a time, in order. One thing worth noticing: indentation matters. Everything inside start: is indented with a tab. Spaces won't work here — always use tabs.

Quick recap

  • Every program needs a start: block — it's where execution begins
  • print() prints a line of text and moves to the next line
  • Code runs top to bottom, in the order you write it
  • Use tabs to indent — not spaces
Copied!