Skip to content

The Dazzle language specification

Version: 0.1 (released 2026-11-04), revision 117 Status: M0–M8, M10, M11, M14 and M15 implemented, and most of M9 and M12 — Dazzle programs compile and run, own, move and drop their resources deterministically, have no undefined behaviour outside unsafe on one thread (§1.1), get their memory where the compiler places it (§14.6), have generics, traits, unions, macros and reflection, call C and C++ libraries that dz builds from vendored source, run about as fast as the same programs written in C++, and are edited with a language server. Still to come: the editor lacks some code actions and incremental analysis (M9), and the standard library, which has carried a game written without C++ (M12’s criterion), is still growing. Open work is the backlog, docs/tasks.md; what was built, milestone by milestone, is in docs/log/.

0.1 was released on 2026-11-04, at revision 117, by the author’s decision: a language server to work in (§19 M9), a standard library a game is written against (M12), and C++ interop (M7) were all there. The language is still young and still changes. This document is revised, not versioned: the revision numbers in §21 track changes to the language, and the compiler’s releases (v0.1.0, v0.1.1, …) say which revision they carry. Target: a systems language that compiles to readable C++17, for the places C++ is used today: games and engines, embedded systems, tools, and real-time code.

One file per top-level section; start with §0.1, the whole language on one page. Section numbers are stable and are what code, commits and the other documents cite (spec §6.4); the file names only make them findable.

§ Section
§0 How to read this document
§1 Design principles
§2 Lexical structure
§3 Projects, modules, and imports
§4 Visibility
§5 Types
§6 Value semantics: ownership, copy, move, drop
§7 Declarations
§8 Generics
§9 Errors and absence
§10 Statements and control flow
§11 Operators
§12 Metaprogramming
§13 Reflection
§14 Memory and allocators
§15 C++ interoperability
§16 Code generation
§17 Compiler architecture and toolchain
§18 Decisions log
§19 Roadmap
§20 Appendix: grammar sketch
§21 Changelog