Documentation
Introduction
Getting Started
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
LLMs
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
Brand
- Brand — Logo, wordmark, and visual identity guidelines
Builtins
- Templates — Pebble-based template rendering with Vary data types as context