twill 1.3.0 — the systems-mode front end
twill 1.3.0 — the systems-mode front end
mode systems is the dialect twill is being rewritten in, on the way to a self-hosted compiler. In 1.3.0 the Go bootstrap parses, type-checks and formats all of it: every file in src/, std/, examples/ and testdata/ — the whole self-hosted compiler and standard library included — now goes through the front end cleanly.
Language features (each mirrored into the self-hosted compiler in lockstep)
enumdeclarations andmatchexpressions — sum types and pattern matching, with wildcard and payload-binding patterns and statement arm bodies.structdeclarations —struct Name { field: Type, ... }, the way the compiler declares its own types.- Generics in annotations —
Arr[I64],Dict[Str, V],Res[T, E], nested and qualified. Res/Optwith postfix?— built-inOk/Err/Some/Noneand error propagation.- Typed record literals —
Point { x: 1.0, y: 2.0 }. - Field and index assignment —
obj.f = v,arr[i] = v, composing. - Bitwise operators on I64 —
and,or,xor,shl,shr,bnot. mode systems, qualified type names, contextualunit/type, and grouped multi-line continuation.
Notes
- Running the self-hosted compiler on the bootstrap is the next step and is not yet done; what remains is the systems-mode runtime primitive library.
- The array/ML language the bootstrap has always been — tensors, autodiff (forward and reverse mode), the shape checker, the formatter, the CLI — is unchanged and fully backward compatible. Files written by earlier versions still load.
See CHANGELOG.md for the full list.