Syntax and Lexing
Tokens, comments, semicolons, identifiers, literals, and precedence rules.
Identifiers and keywords
The lexer distinguishes names, types, modules, and constants with casing conventions instead of extra syntax.
snake_casefor variables, functions, and modules.PascalCasefor types, structs, enums, and interfaces.SCREAMING_SNAKE_CASEfor constants.- Reserved keywords include control flow, declarations, concurrency, and ownership markers.
Literals
Numeric bases, suffixes, strings, chars, booleans, and nil all have explicit forms.
- Unsuffixed integers default to
i32. - Unsuffixed floats default to
f64. nilis the single absence value and has its own type.charholds exactly one Unicode scalar value.
let port = 443
let ratio = 3.14
let mask = 0xff
let empty = nilOperators
Arithmetic, comparison, logical, optional, bitwise, and assignment operators each keep one meaning.
/truncates toward zero for integers.%keeps the sign of the left operand.**yieldsf64.??and?.act on bare optionals.asis the explicit numeric cast operator.
Comments and newlines
La3 keeps comments simple and lets newlines end statements when the expression is already complete.
This keeps short examples readable while still allowing explicit separators when two expressions share a line.
//is a line comment./* ... */covers longer explanatory blocks.///documentation comments are meant for Markdown prose.