The Wax standard
What Wax is now, by topic. DECISIONS.md records how each rule was decided; this standard says
what the rules are today.
How it's written
DECISIONS.mdis the source. Every rule here names its decision, as in "(D7)". Where the two disagree, the decision wins and the standard is wrong.- Wax takes many rules from Unio (D15, D16, D22). Those name Unio's decision, as in "(Unio D170)", and point to the chapter of Unio's standard that has them in full. Unio's examples are read in Wax's syntax, as the table below shows.
- Undecided means "Not decided". Anything the decisions leave open is marked Not decided where it would go, never filled in here. A building session stops there with "not designed yet" (IMPLEMENTATION.md, rule 11).
- No compatibility promise. Any new version of Wax may change any rule here, and scripts and hosts are updated to match (D137).
Reading Unio's rules in Wax's syntax
Where a chapter here points to Unio's standard, Unio's examples change only as Wax's decisions say:
| Unio | Wax | Decided in |
|---|---|---|
proc.main: … end proc.main around the program | the script's top level, run once when it's loaded | D4 |
let $x: Whole = 0; | x = 0, the type worked out | D2, D7, D8 |
var $x: Whole = 0; | mut x = 0 | D2 |
$x | x | D7 |
; at the end of a statement | nothing: the line ends it | D8 |
: at the end of an opening line | nothing | D9 |
else if | elif | D10 |
proc name[$a: Whole] returns Whole: | proc name[a: Whole] -> Whole, types always written | D21, D45, D81 |
show_msg("{x}") | "{x}": every text fills its braces in both | D75 |
for each $x in $xs: | for_each x in xs | D146 |
show_msg, ask, random | doors, if the host opens them, under the names it chooses | D11 |
.unio | .wax | D25 |
Chapters
- Terms
- Lines and blocks: lines,
end, indentation, files - Variables and values: making and changing variables,
mut,unused, names' spelling, values - Procedures: definitions, families, worked-out types, calls, labels, defaults and slides
- Control flow:
if,elif, comparisons, logic,while,for_eachandbreak - Types:
Whole,Float,Bool,Text, lists and arrays, records, dictionaries, options andmatch,Maybe, filling in text, converting - Failures:
?,??andotherwise - Built in: what Wax provides itself
- Hosts: loading, doors, narrowings on doors, IDs and limits
- Checks and messages: when checks run, build modes, and how the host is told