Skip to content

v0.4.0

Choose a tag to compare

@ganehag ganehag released this 12 Jun 06:24
· 188 commits to main since this release

Warning

No binaries. The release build failed to cross-compile (macOS timeval widths, Windows cap:fs). Binaries shipped in v0.4.1, which is content-identical apart from the build fixes. The notes below remain the 0.4 release notes.

The release where the type system stopped negotiating — and the engine learned to say its own name.

Breaking

  • Strict nominal types. Named values no longer mix with bare base values in arithmetic or comparison: Severity(4) >= 3 is a TypeError. Write Severity(4) >= Severity(3) or unwrap with int(s). Subtypes still mix with their parent type.
  • Strict int/float ordering comparisons. 1.5 > 1 is now a TypeError, matching arithmetic (1.5 + 1 was already rejected). Convert one side explicitly — 1.5 > float(1) — or write the literal as 1.0. Equality (==) is unchanged and still evaluates to false across types.

Improved

  • Runtime errors explain themselves (#107). Type and range errors name the operand types and suggest a remedy (cannot apply '>' to float and int; use matching numeric types such as 2.0 or float(2)), and the REPL prints the same --> repl:line:col location and caret block as file mode.
  • Heap scaling (#104). Slab size classes scale with the configured heap (up to 2 MiB blocks), a new 16 MiB server preset joins tiny/dev/stress, and allocations above the block ceiling fail gracefully with AllocationTooLarge instead of OOM.
  • String safety (#101). The .string immortality invariant is enforced with a debug tripwire; GC-safety fixes in fs.list, the split family, and dynamic string concat.
  • std.math abs/min/max/sign preserve int inputs instead of widening to float.

Infrastructure

  • Versioning discipline (#106). gengo --version, gengo_engine_version() in the C API (returns bare "0.4.0", machine-parseable), version source of truth in build.zig, stability policy in the README, tagging workflow in CONTRIBUTING.
  • The docs build themselves. docs.gengoscript.org is generated by a Gengoscript script (tools/site-builder) — every docs deploy is an end-to-end test of the language. This release it was rewritten around structs, templates, multiline strings, and multi-value returns, and the dogfooding surfaced three engine issues (#109, #110, #111) now slated for v0.5.0.
  • New native capability test lane; bench and heap tests join the CI gates.

Full changelog: CHANGELOG.md · v0.3.1...v0.4.0