A new machin release shipped, headlined by proper support for make([]T, n) and make([]T, len, cap). The slice implementation, AST, and codegen all learned the two- and three-argument forms, so you can preallocate a slice with an explicit length and an optional capacity the way you would in Go.
Alongside that, the router got a semantics pass and the coverage tooling got some rough edges filed off. The Windows target also picked up two C libraries that had been missing.
What changed
-
make([]T, n)andmake([]T, len, cap)now work end to end (#584, #617). TouchedSPEC.md,alias.go,ast.go,codegen.go, anddocs/LANGUAGE.md. - Router semantics: unknown paths are now distinguishable.
navigatereturns-1for unknown paths and the route table resets on init (#606, shipped as v0.130.0). - The upper bound of
navigateis now guarded as well, and the new semantics are documented (#609). -
machin test --coveris now advertised in the usage output and header (#615). -
--coverJSON emits empty uncovered arrays instead ofnull(#616), so consumers don't have to special-case missing keys. - v0.129.0: SQLite on the Windows target, verified by running it (#605).
- v0.131.0: zlib on the Windows target, verified by running it (#613).
A concrete example of the new slice allocation:
buf := make([]byte, 0, 4096)
rows := make([]string, n)
The first form gives you a zero-length, 4096-capacity buffer for appending; the second gives you a length-n slice ready to index and assign. Both now go through the same codegen path as the rest of the slice machinery.
Nine files changed in this release (+292/-2), mostly in the language core and docs.
Top comments (0)