Repository navigation
Syntax Principles
Joe Curlee (w4ffl35) edited this page Jan 26, 2026
·
5 revisions
These principles constrain syntax design so Curlee remains unambiguous and LLM-friendly.
The concrete MVP syntax is defined in docs/SYNTAX.md.
- No indentation-sensitive parsing.
- Blocks must be explicitly delimited (e.g.,
{ ... }). - Statements use explicit terminators where needed (e.g.,
;) to aid recovery.
- Prefer short, consistent keywords over dense symbolic syntax.
- Avoid constructs that are easy to hallucinate (implicit terminators, significant whitespace).
- Contracts:
requires <pred>ensures <pred>
- Refinements:
where <pred>
If these constructs appear, they must be parsed with stable spans and either:
- lowered into the solver fragment (docs/VERIFICATION_SCOPE.md), or
- rejected with a diagnostic (no silent weakening).
- Any capability-bearing or foreign-function action must be explicit.
- Future reserved keywords:
unsafe,cap,import.
- Grammar should allow synchronization points (
;,}) so the parser can emit multiple diagnostics.
- No “clever” syntax that sacrifices tooling predictability.
- No implicit coercions that make verification ambiguous.