Skip to content

Simple

Familiar syntax.Explicit semantics.

Start with a small program you can read, run, and change. Then explore how the same language expresses applications and helps agents work with code.

simple.norm
main() {
  String language = "Norm"
  List<String> steps = ["Read", "Run", "Change"]

  printLine("Hello, ${language}")
  for step : steps {
    printLine(step)
  }
}

Run norm simple.norm → Hello, Norm Read Run Change

Agent first

Give an agent facts it can inspect and verify.

Use @Document to describe the intent of a declaration and connect related APIs through checked references. The compiler supplies its signature and types; test associations come from @Test.

agent_document.norm
import std.annotation.Document
import std.testing.Test

@Document(description: "A task visible to the user.")
value Task {
  String title
}

@Document(description: "Formats a task title for a summary.")
String describe(Task task) {
  return "Task: " + task.title
}

@Test(functions: [describe.function])
Void describesTask() {
  require(
    condition: describe(Task(title: "Learn Norm")) == "Task: Learn Norm",
    message: "task summary"
  )
}

@Document(
  description: "Entry point for agents exploring task summaries.",
  types: [Task.class],
  functions: [describe.function]
)
class TaskApi {}

main() {
  printLine(describe(Task(title: "Learn Norm")))
}
  1. Understandnorm query agent_document.norm describe --source --references --testsnorm query agent_document.norm TaskApi --source
  2. Previewnorm refactor name agent_document.norm describe --to summarize --preview
  3. Verifynorm check agent_document.norm --format jsonnorm test agent_document.norm --format json

Selected query fieldsdescribe.documentation: Formats a task title for a summary. describe.references: 4 describe.tests: 1 TaskApi.documentation: Entry point for agents exploring task summaries.

Program outputTask: Learn Norm

Semantic query and refactoring here require the development toolchain. The agent applies previewed edits before verification.

Explore Agent tools →

Application development

Express the rules of a real program in its code.

Each example is a complete runnable file with a checked result. Select the problem you want to explore.

Model identity, values, finite states, named calls, and expression results together.

application_data.norm
interface Labeled {
  String label()
}

value TaskId {
  Integer number
}

enum State {
  Ready,
  Doing(Integer percent),
  Done
}

class Task implements Labeled {
  TaskId id
  String title
  State state

  String label() {
    String progress = switch state {
      case Ready { break "ready" }
      case Doing(Integer percent) { break "${percent}%" }
      case Done { break "done" }
    }
    if state == State.Done { "${title} ✓" } else { "${title}: ${progress}" }
  }
}

Task newTask(String title, Integer number, State state = State.Ready) {
  Task(id: TaskId(number: number), title: title, state: state)
}

main() {
  Task task = newTask(title: "Learn Norm", number: 7)
  Task same = task
  printLine(task.label())
  same.state = State.Doing(percent: 50)
  printLine(task.label())
  same.state = State.Done
  printLine(task.label())
}

Run norm application_data.norm

Checked outputLearn Norm: ready Learn Norm: 50% Learn Norm ✓

These examples require the development toolchain.

Explore language features →

Start with one feature.

Every learning example is executable and checked against the compiler.

Norm 0.24 development line