Indent 2.4 — lighter on memory, and two release channels
Building on 2.3's speed work, 2.4 shrinks how much memory Indent uses. Every collection — strings, lists, dictionaries and groups — is now copy-on-write: reading a variable is a refcount bump instead of a deep copy, and the copy only happens on the first write after a value becomes shared. Pass-by-value behaviour is unchanged — var b = a still never lets b affect a.
- Peak RSS holding 200 copies of one 200 KB string: 84.7 MB → 12.6 MB
- Passing a 201 KB string to a function: 130 µs → 7.7 µs
len()of a 20 000-item list: 0.0767 s → 0.0000424 shas_key()on a 5 000-key dict: 0.0711 s → 0.0000659 s- Startup importing five
stdmodules: 3.51 ms → 2.49 ms
Value is 32 bytes (was 56) and every statement 112 (was 152) — guardrail tests fail the build if either grows back.
Release channels. Two channels now come out of the same pipeline and the same gates. stable is the default and what releases/latest resolves to; exp follows tagged prereleases such as v2.4.1-exp.1, published as GitHub prereleases, so an existing stable install is never moved onto an experimental build by accident.
Use indent --switch-to-exp / indent --switch-to-stable / indent --channel, or install a channel directly with --channel exp. Checksums are verified before anything is installed, and the replaced binary is kept as a .bak.
⚠️ Breaking: indent --version now prints the channel — indent 2.4.0 (stable). Anything parsing the version from that line should take the first word.
Upgrading is automatic: the on-disk program cache changed format, so the first run after upgrading re-parses each cached file once. Full release notes →