Repository navigation
Home
Humbat edited this page Sep 8, 2026
·
4 revisions
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.
Get up and running with Tera instantly:
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);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;
}-
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 forif/elseconditions andwhileloops[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].