Small language, practical scripts

CoffeeScript feel. Golang practicality.

Tya pairs lightweight, indentation-based writing with straightforward command-line tooling and compile-to-C execution.

hello.tya indented blocks
user =
  name: "komagata"
  age: 20

greet = user -> "Hello, " + user["name"]

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

Language shape

Readable by design, small by constraint.

The page is organized around what the language feels like to read and write.

Blocks

Indented lines form blocks, so nested logic stays visible without extra braces.

Values

Use nil, booleans, numbers, strings, arrays, dictionaries, functions, errors, and modules.

Control

if, elseif, else, while, array loops, dictionary loops, break, and continue.

Functions

Function literals, calls, implicit returns, explicit return, and multiple return values keep scripts compact.

Modules

Split code with module, load it with import module_name, and call members with module.member.

Documentation

Friendly docs for reading and writing Tya.

Start with the guide, then open the current reference when you want exact behavior.