Add string interpolation syntax for constructing strings from expressions.
Motivation
Prompt construction is the dominant string operation in LLM agent code. Currently Vera requires multiple string_concat calls or chained IO.print statements. String interpolation dramatically reduces this friction.
Proposed syntax
To be determined. Options include:
-- Option A: f-string style
let @String = f"Hello, {name}! You have {count} items."
-- Option B: template literal style
let @String = `Hello, ${name}! You have ${count} items.`
Canonical form
The formatter must normalize interpolated strings to a single canonical form to preserve Vera's one-way-to-write-it principle. Only expressions (not statements) should be allowed inside interpolation braces.
Dependencies
- None (grammar + transform + codegen change)
Add string interpolation syntax for constructing strings from expressions.
Motivation
Prompt construction is the dominant string operation in LLM agent code. Currently Vera requires multiple
string_concatcalls or chainedIO.printstatements. String interpolation dramatically reduces this friction.Proposed syntax
To be determined. Options include:
Canonical form
The formatter must normalize interpolated strings to a single canonical form to preserve Vera's one-way-to-write-it principle. Only expressions (not statements) should be allowed inside interpolation braces.
Dependencies