Language tour

The tour walks through Zane one topic at a time, each page built from small programs you can run.

Read the pages in order; each page builds on the pages before it.

  1. Basics: a program, symbols, numbers, strings
  2. Functions and methods: methods and their subject, : and ! calls, overloading, lambdas
  3. Types: structs, constructors, value semantics, operators
  4. Control flow: if, loops, guard and workers, all library code
  5. Enums, variants and match: sum types and matching
  6. Generics: type and number parameters, containers
  7. Intrinsics and concepts: the @ names, storage primitives, and the types of literals and blocks
  8. Memory: owners, references, moves and destruction
  9. Effects and capabilities: what a call may change, and reaching the outside world
  10. Errors: abortable functions and their handlers
  11. Packages: imports and privacy
  12. Concurrency: spawn, its safety rules, and worker pools

Each page links to the sections of the specification that state the page’s rules precisely. The guide Calling C covers calling C code from Zane.