Skip to content
Weaverv0.5.0

Language reference

The reference is Weaver’s specification, taken as it is from its repository: what the compiler implements is checked against it, and its code blocks are formatted and parsed by wv fmt. It is precise rather than gradual, and some chapters mention a draft that revises them.

Intent and principles What Weaver is after, and what it borrows
Data types Records, enums, unions, options, collections
Functions, control and pipelines Functions, sequences, loops, pattern tests
Contracts What a type promises, and how it adopts it
Meta-programming meta code, types as values, annotations, quotes
Memory model Value semantics, passing conventions, references, visible costs
Resources using, defer, disposal errors, arenas
Errors and concurrency T ! E, tasks, sharing, the entry point, time
Compilation and tooling The compiler’s passes and the wv command
Open questions What is not settled yet
  • The grammar: the syntax the parser recognizes, and the choices that resolve its ambiguities.
  • Memory model, revised: the draft that revises the memory model and resources chapters.
  • Annotations and metadata: the draft that revises annotations, types as values and field tags.