On this page

0019. Keep var and {x} interpolation

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

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.