Luce Base
LuceSourceLuciaOS

The Guide

One topic per chapter, each complete on its subject. Where the Tour gives a first look, the Guide gives every form and rule you will meet, with examples, and links to the Reference for the precise wording.

The language

  1. Syntax and names: layout, comments, naming, scope, reserved words
  2. Types: numbers, text, arrays, spans, pointers, optionals, tuples, vectors, layout
  3. Expressions and bindings: variables, globals, operators, conversions, equality
  4. Control flow: if, loops, iteration, match, labels, defer
  5. Functions and methods: parameters, defaults, named arguments, methods, function values
  6. Structs, enums and unions: fields, initialisers, cases, flags, unions
  7. Generics and interfaces: type parameters, constraints, interfaces, the standard interfaces
  8. Errors: optionals, failure, try, catch, else, error codes, traps, assertions
  9. Memory: pointers, new and free, allocators, arenas, ownership, what is checked

Programs

  1. Modules and packages: files, every form of import, manifests, dependencies, luc
  2. Testing: test blocks, test files, running them
  3. Concurrency: threads, atomics, sync
  4. C: declaring C functions and types, C sources and libraries, bind, exporting
  5. Luce: using Base modules from Luce
  6. Low-level tools: inline assembly, attributes, volatile, freestanding programs
  7. Building and debugging: the compiler's commands, targets, the cache, traps, crash reports, debuggers

Gotchas: the things most likely to surprise you, in one list.