Canonical syntax
Every program has exactly one indentation-based source representation (a lossless syntax tree). Programmers do not have to choose between competing ways to write the same code.
Every program has exactly one indentation-based source representation (a lossless syntax tree). Programmers do not have to choose between competing ways to write the same code.
Tya goes through C, so cross-compilation is straightforward and apps can ship as one runtime-included binary. No VM or external interpreter required.
The tya binary holds the compiler, formatter, checker, test runner, and package manager.
user = { name: "komagata", age: 20 }
greet = user -> "Hello, {user["name"]}!"
if user["age"] >= 20
print(greet(user))
brew tap komagata/tap
brew install tya
curl -fsSL https://tya-lang.org/install.sh | sh
curl -fsSL https://tya-lang.org/install.sh | sh
irm https://tya-lang.org/install.ps1 | iex
Compile and run a source file in one step. Use it for prototypes and quick local checks.
tya run hello.tya
Create an executable. The resulting binary can run without the Tya command.
tya build hello.tya -o hello
./hello
Run the project test suite. The test runner is included in the same binary.
tya test
Detect unused variables and discouraged patterns before running or in CI.
tya lint src
List tasks declared by the project and run them from the same command.
tya task
tya task run