Overview

Canonical syntax

Every program has exactly one source representation.

Compiles to C

Small, portable runtime with a precise mark-and-sweep GC. No virtual machine, no embedded interpreter — just a single binary you ship.

All-in-one toolchain

The tya binary holds the compiler, formatter, checker, test runner, and package manager.

Kind diagnostics

Every error has a stable code (TYA-Exxxx), a banner with the source snippet, an actionable hint, and a linked explanation. JSON output for CI and editors.

hello.tya
user = { name: "komagata", age: 20 }

greet = user -> "Hello, {user["name"]}!"

if user["age"] >= 20
  print(greet(user))

Install

brew install komagata/tap/tya

Download the release source and build the tya command locally.

curl -L https://github.com/komagata/tya/archive/refs/tags/v0.61.0.tar.gz | tar xz
cd tya-0.61.0
go build -o tya ./cmd/tya
./tya version

Download the release source and build the tya command locally.

curl.exe -L https://github.com/komagata/tya/archive/refs/tags/v0.61.0.tar.gz -o tya-v0.61.0.tar.gz
tar.exe xzf tya-v0.61.0.tar.gz
cd tya-0.61.0
go build -o tya.exe ./cmd/tya
.\tya.exe version

Quick run

  • Build and run
    tya run examples/hello.tya
  • Build an executable
    tya build examples/hello.tya -o hello
    ./hello

Docs