Documentation

Learn how to use varylang, from installation to advanced features.

Alpha. Vary is under active development and not ready for production use. Syntax, APIs, performance, and behaviour may change between releases.

Introduction

Introduction What Vary is and why it exists

Getting Started

Getting started Install Vary and write your first program
Syntax overview A guided tour of Vary's syntax and features
CLI reference Commands for running, testing, formatting, and building
Configuration Project settings via vary.toml
Project layout Recommended directory structure for Vary applications
Quick reference Daily command sequences for Vary development
FAQ: Frequently asked questions Common questions about the language and toolchain
Glossary Plain-English definitions for verification, compiler, and language jargon

Language

Types Primitives, optionals, function types, and type inference
Classes and data types Classes for mutable state, data types for immutable values
Generics Write type-safe code that works with any type
Enums and pattern matching Fixed variant types with payloads and pattern matching
Collections and strings Lists, dicts, sets, and string operations
Error handling Try/except, Result types, and custom error classes
Modules and imports File-based modules, imports, and package structure
Concurrency Spawn tasks, manage task groups, and handle cancellation
Contracts Preconditions and postconditions on functions

Standard Library

Built-in functions Functions available everywhere without imports
Standard library Importable modules for JSON, crypto, filesystem, HTTP, time, process, env, logging, and more

Testing

Check rules Reference for all vary check diagnostic rules, categories, and auto-fixes
Testing Built-in test blocks with observe assertions and property-based testing
CI verification Set up GitHub Actions for Vary projects with verification profiles

Installation

Linux Install the Vary toolchain on Linux
Windows Install the Vary toolchain on Windows
varyup The toolchain manager that installs and updates Vary
Docker Run Vary in a Docker container
VS Code VS Code extension with syntax highlighting and LSP
macOS Install the Vary toolchain on macOS

Comparisons

Python comparison Side-by-side syntax and semantics comparison with Python
Hypothesis comparison How Vary's across-based property testing compares to Hypothesis for Python
Related languages Languages that influenced Vary's design

LLMs

Writing Vary with LLMs Using AI coding tools to write Vary programs
LLM coding checklist Do-this / don't-do-this rules for LLM coding assistants writing Vary

About

Varyonic programming The design philosophy of Vary: observable behaviour, typed domains, pure logic, and verification-first architecture
Language design choices Trade-offs and rationale behind language decisions
The compiler How the compiler pipeline turns source into bytecode
Performance Benchmark results comparing Vary to Java and Python
Ecosystem Tools, extensions, and integrations around Vary
What we ship Distribution formats and what each release includes

Embedded DSLs

Embedded DSLs Compiler-integrated DSLs for SQL, HTTP, structured logging, and JSON decode
HTTP services Expose interfaces as HTTP services with typed routes
SQLite databases Built-in SQLite support with compile-time typed queries
Structured logging Typed, mutation-aware logging with pluggable sinks
JSON decode Typed JSON extraction with path-aware errors, validation predicates, and the ? operator

Project Management

Known Issues Currently known bugs and limitations
Versioning Monotonic channel versioning instead of semver

Releases

Releases Release notes for every version

Brand

Brand Logo, wordmark, and visual identity guidelines

Builtins

Templates Pebble-based template rendering with Vary data types as context