Skip to content

Language Reference

This section provides a comprehensive reference for the Strata programming language.

Overview

Strata is a statically typed programming language. This reference covers all language features.

Table of Contents

Language Basics

  • Variables - Variable declarations and scoping
  • Types - Type system, primitives, nullable, unions
  • Functions - Function definitions, parameters, return types
  • Control Flow - if/else, loops, match expressions

Object Oriented Design

Project Structure

Standard Library

Advanced

Core Principles

Strata follows these core principles:

  1. Safety by default: All errors must be handled
  2. Explicitness over magic: No implicit behavior
  3. Strong static typing: Types are checked at compile time
  4. Tooling-first: Built for great IDE support

Quick Reference

Basic Syntax

strata
// variables
let name: String = "Luna";
let age = 6;  // type inferred

// types
type UserId = Int;

// functions
fn greet(name: String): String {
    return "Hello, ${name}!";
}

// logic belongs in functions (e.g. main)
fn main(): Void {
    try {
        let result = loadUser(id: 1);
        print(result.unwrap().name);
    } catch (e) {
        print("Error: " . e.getMessage());
    }
}

Explore the language features by clicking on the topics above.

Branding · License
Released under the MIT License.