0019. Keep
var and {x} interpolation
- Status: Accepted
- Date: 2026-10-30
- Plan: M2.6
- Review: Authoring, tooling and context
- Owner review: Maintainer delegated this decision on 2026-10-30; recorded by the orchestrating agent on T0 evidence.
Context
CP-2.1 left two syntax experiments open, to be decided by the
T0 smoke test: let-mut (would models make fewer
errors with let mut than var?) and
interp-syntax ({x} or \(x)
for string interpolation). T0 (bench/transfer/T0.md)
gave three models (Claude Haiku, gpt-6-luna, DeepSeek v4.1 flash)
only docs/spec/LANGUAGE.md and 10 tasks. Of 30
programs, 30 compiled first time and printed the right output.
Models wrote var 36 times with no mutability errors,
and used {x} and {expr} interpolation
correctly every time. T0 did not run a let mut or
\(x) arm, so it shows the current choices work, not
that the alternatives are worse.
Decision
Keep var for reassignable locals and
let for immutable ones. Keep {x}
interpolation with {{/}} escapes. Close
both experiments. Revisit either one only if the harder T1 tasks
(M7.5) show mutability or interpolation errors that the other
spelling would plausibly avoid.
Alternatives considered
let mut— one more token per mutable binding and a Rust-ism that avar-trained reader does not need. T0 showed novarerrors to fix.\(x)— Swift spelling; it needs a backslash inside strings that models also escape for JSON and shell.{x}matched what all three models wrote without prompting.- Wait for T1 — leaves two open questions in every later spec and test without evidence pointing either way; changing later stays cheap while programs are small.
Consequences
The spec, goldens and formatter need no change. PLAN.md marks
let-mut and interp-syntax resolved, and
EXPERIMENTS.md records them as closed without a branch. T1 should
log any mutability or interpolation errors so that this ADR can be
reopened on evidence.