Language reference

What MUL does not have

Do not write these: the compiler rejects them. The first table lists features that are planned, with the version they are planned for. The second lists things MUL leaves out by design.

Not yet

Construct Today Planned
for, break, continue, match while with a counter var; return from the body after v0.1 subset
effects alloc, async, unsafe; several effects on one function pure and io only, one per function v0.1 language
string operations: +, ==, length, indexing, formatting literals, variables, parameters and print only; == is MUL-T015 v0.1 language
printing numbers, conversions between string and i32 return the number from main (--print-result) v0.1 language
input (reading stdin, files, arguments) none not planned yet
i64, f64, other integer sizes, unsigned types i32 only v0.1 language
hex, binary or _-separated literals, character literals decimal digits only not planned yet
structs, enums, Option/Result, methods, interfaces none v0.1 language
import, export, several modules in one program one module per program v0.1 language
generics none after the v0.1 semantics are stable
semicolons, block comments /* */ statements need no separator; // only not planned
trailing comma in parameters or arguments rejected (MUL-S002) not planned
module-level let/const a parameterless function v0.1 language
compound assignment +=, ++, multiple assignment a, b = b, a x = x + 1; a temporary let not planned yet
if as an expression, ternary c ? a : b an if statement assigning a var not planned yet
bool ↔ i32 conversions if returning 1 or 0; n != 0 not planned

Not by design

This page is docs/language/ in the repository, published as it is. Every mul code block on it is compiled and run by the test suite.