Verse Language Documentation
Warning
This is an early draft of the Book of Verse. Suggestions for improvements are welcome. Frequent updates are to be expected.
This documentation provides an in-depth look at the Verse programming language, its philosophy, and core concepts.
Verse is a multi-paradigm programming language developed by Epic Games, drawing from functional, logic, and imperative traditions to create a coherent system for building metaverse experiences.
Verse has three core principles:
- It's just code - Complex concepts are expressed as primitive Verse constructs
- Just one language - Same constructs for compile-time and run-time
- Metaverse first - Designed for a global simulation environment
Note
The documentation pertains to the head of the main development branch of Verse, some features may be discussed before they are officially released and are thus subject to change. Some Epic internal features may also be discussed.
Documentation Sections
- Overview - Introduction to Verse philosophy and features
- Expressions - Everything is an expression paradigm
- Primitives - Integers, floats, rationals, logic, strings, and special types
- Containers - Optionals, tuples, arrays, maps, and weak maps
- Operators - Arithmetic, comparison, logical, and assignment operators with precedence
- Mutability - Mutable variables, references, and state management
- Functions - Open-world vs closed-world functions, parameters, and return values
- Control Flow - If/else, loops, code blocks, and comments
- Failure System - First-class failure, failable expressions, and speculative execution
- Structs & Enums - Value types and fixed sets of named values
- Classes & Interfaces - Object-oriented programming with inheritance and contracts
- Type System - Types as functions and type checking
- Access Specifiers - Public, private, and protected visibility
- Effects - Effect families, specifiers, and capability declarations
- Concurrency - Structured concurrency with sync, race, rush, branch, and spawn
- Live Variables - Reactive values that automatically update
- Modules & Paths - Code organization and the global namespace
- Persistable Types - Types that can be saved and loaded
- Code Evolution - Versioning and backward compatibility