Skip to content
Humbat edited this page Sep 8, 2026 · 4 revisions

Welcome to the Tera Programming Language Wiki!

Tera is a modern programming language designed with JavaScript-like ergonomics and expressive, type-driven syntax choices. Its core feature is type-first directional assignment using the arrow operator (=>), supporting both concise single-line expressions and traditional block constructs.


Quick Start!

Get up and running with Tera instantly:

Hello World & Basic Variables

Variables use a directional pattern (let <identifier>: <expression> => <type>):

let greeting: 'Hello' => string;
let name: "Tera" => string;
let full: `${greeting}, ${name}!` => string; // "Hello, Tera!"

print(full);

Running a Quick Function

Tera supports both traditional multi-line function blocks and concise inline lambda-style declarations:

// Inline Expression Function
let add: (a: int, b: int) => (a + b) => int;

// Standard Block Function
fn process(num: int) => int {
    if: num > 5 => print("Above threshold!") else: print("Below threshold!");
    return num * 2;
}

Language Features at a Glance!

  • Primitives & Arrays: Explicit typing for integers, strings, booleans, floats, and typed collections (arr[int], arr[string]) with automatic type inference upon indexing[cite: 1].
  • Dual Syntax Control Flow: Offers clean inline arrow syntax (if: condition => action) alongside traditional block syntax for if/else conditions and while loops[cite: 1].
  • Equality Operators: Supports both loose (==) with type coercion and strict (===) equality matching[cite: 1].
  • Flexible Line Endings: Semicolons are optional thanks to automatic line-termination handling[cite: 1].

Clone this wiki locally