Skip to content
Official public specification

Rethon Language Specification

Rethon is a Python-inspired, statically typed, AOT-compiled programming language designed around readability, native performance, memory safety by default, and long-term maintainability.

This site publishes the normative language specification for Rethon. It is intended for language designers, compiler engineers, tooling developers, library authors, educators, and maintainers who need the authoritative source-level contract for the language.

Rethon is not Python-compatible. Python informs the source style and developer experience, while Rethon's semantics are grounded in static typing, value-oriented design, protocols, explicit nullability, memory safety, and native compilation.

Normative status

The specification volumes use normative language. Implementations and tools should treat rules in these documents as authoritative unless a later accepted specification update supersedes them.

Start Reading

Specification Volumes

The language specification is organized into 20 volumes:

  1. Language Philosophy
  2. Lexical Structure
  3. Type System
  4. Declarations and Bindings
  5. Functions
  6. Structs
  7. Classes
  8. Protocols
  9. Generics
  10. Modules and Imports
  11. Enumerations
  12. Pattern Matching
  13. Error Handling
  14. Concurrency and Async
  15. Collections and Iteration
  16. Memory Model
  17. Standard Library
  18. Foreign Function Interface
  19. Package and Dependency Management
  20. Toolchain and Build System

Core Commitments

  • Python-inspired readability without Python runtime compatibility.
  • Static typing with inference used only where it preserves clarity.
  • Non-null types by default, with nullable forms represented explicitly.
  • Structs as value types and classes as reference types.
  • Protocols as the primary mechanism for behavioral contracts.
  • Generics as a first-class feature, with protocol-based constraints and specialization where practical.
  • Memory safety by default without forcing ordinary code into low-level ownership syntax.
  • AOT-oriented compilation through rethonc and package workflows through RETPAK.