Wyn

Modern memory-safe systems programming language

Why Wyn?

🛡️

Memory Safe

Automatic memory management with zero-cost abstractions. No segfaults, no memory leaks.

Fast

Compiles to optimized native code. C-level performance without the complexity.

🔧

Modern

Pattern matching, generics, traits, async/await, and comprehensive error handling.

📝

Simple

Clean, readable syntax that's easy to learn and maintain. Focus on getting things done.

⚙️

Productive

Fast compilation, excellent error messages, and comprehensive standard library.

🌍

Cross-Platform

Build for Linux, macOS, and Windows from a single codebase.

Everything is an Object

// Numbers are objects with methods
var answer = 42.to_string()        // "42"
var rounded = 3.7.round()           // 4.0
var absolute = -5.abs()            // 5
var power = 2.pow(8)                // 256

// Strings are objects with powerful methods
var clean = "  hello world  "
    .trim()
    .capitalize()                    // "Hello World"

var shout = "hello"
    .upper()
    .replace("L", "*")
    .reverse()                       // "O**EH"

// Check string properties
if "hello world".starts_with("hello") {
    var length = "hello".len()    // 5
}

// Arrays are objects with functional methods
var numbers = [1, 2, 3, 4, 5]
var doubled = numbers
    .map(fn(x) => x * 2)
    .filter(fn(x) => x > 5)      // [6, 8, 10]

var sum = numbers
    .reduce(fn(a, b) => a + b, 0)  // 15

// Floats have math methods built-in
var pi = 3.14159
var area = pi.pow(2).round_to(2)  // 9.87
var sine = 1.57.sin()              // ~1.0

// Method chaining everywhere - it just works!
var result = "HELLO"
    .lower()
    .capitalize()
    .len()
    .to_string()                     // "5"

Get Started

Install Wyn in seconds

curl -sSL https://wynlang.com/install.sh | bash
📚 Read the Documentation