Documentation

Welcome to Moth. Start with the project tool, learn the core language in order and drop into the focused pages when you need a precise rule.

The progress matrix tracks current implementation and backend coverage.

Start here

  1. Getting Started
  2. Language basics
  3. Values and bindings
  4. Numbers
  5. Casts
  6. Functions
  7. Branching
  8. Loops
  9. Structs
  10. Choices
  11. Errors, options and assertions
  12. Collections and maps
  13. Templates
  14. Constants and compile-time behaviour
  15. Aliases
  16. Generics
  17. Traits
  18. Reactivity
  19. Memory and lifetimes

Projects and content

Compiler and codebase internals

Future design drafts