Skip to content

Rename the optimistic statement to guess - #47

Merged
ryansolid merged 4 commits into
mainfrom
claude/project-thread-2sdg89
Nov 11, 2026
Merged

ryansolid merged 4 commits into
mainfrom
claude/project-thread-2sdg89

Conversation

@ryansolid

Copy link
Copy Markdown
Member

Requested by Ryan · project thread

guess x := e replaces optimistic x := e. This is recorded as spec/07 decision 18, ruled 2026-11-11. Semantics and lowering are unchanged (createOptimistic / createOptimisticStore). Only the surface word changes, and source stays as it is.

Changes

  • Parsers (ref/src/parse.ts, compiler/src/parse.rs): guess is now the keyword. optimistic stays reserved, and a line that uses it fails with the new parse code OPTIMISTIC, whose hint names guess. The hint is covered by a new section in guide/diagnostics.md and a rejected variant in S-parse-hints.
  • Diagnostic codes:
    • OPTIMISTIC_OUTSIDE_HOLD → GUESS_OUTSIDE_HOLD
    • OPTIMISTIC_NO_QUESTION → GUESS_NO_QUESTION
    • OPTIMISTIC_REVERTED → GUESS_REVERTED
    • The HELD_WRITE, STALE_WRITE_BACK and AC-1b trigger messages now say guess.
  • Docs and code samples: the spec, guide, scenarios, examples, eval reference apps and the VS Code grammar now use guess. AST kinds inside the compiler keep the name optimistic. eval/results and the preregistrations are left unchanged as historical records.

Tests

  • npm test (interpreter): 122 pass
  • npm run oracle: 122 pass, 0 fail, 14 recorded divergences (Solid next @ 2105ffb)
  • npm run compiled: 122 pass, 0 fail, 14 recorded divergences
  • npm run types: 168 pass
  • npm run crate: 343/343 programs agree with ref/
  • cargo test --release: passes, including diagnostics_page

No scenario's result changed except S-parse-hints, which gains the OPTIMISTIC variant.


Generated by Claude Code

`guess x := e` replaces `optimistic x := e` (07 decision 18, ruled
2026-11-11). Semantics and lowering are unchanged (createOptimistic /
createOptimisticStore); only the surface word moves.

- Parsers (ref/src/parse.ts, compiler/src/parse.rs): `guess` is the
  keyword; `optimistic` stays reserved and is a parse error coded
  OPTIMISTIC whose hint names `guess` (guide/diagnostics.md, S-parse-hints).
- Codes: OPTIMISTIC_OUTSIDE_HOLD -> GUESS_OUTSIDE_HOLD,
  OPTIMISTIC_NO_QUESTION -> GUESS_NO_QUESTION, OPTIMISTIC_REVERTED ->
  GUESS_REVERTED; HELD_WRITE / STALE_WRITE_BACK / AC-1b messages say `guess`.
- Spec, guide, scenarios, examples, eval reference apps and the editor
  grammar use `guess`. eval/results and preregistrations are left as
  historical records.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWP7LmQhib6M9zGnmBH
@ryansolid ryansolid self-assigned this Nov 11, 2026
Drops the OPTIMISTIC parse hint, its guide section, spec row and
S-parse-hints variant; 07 decision 18 says why.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWP7LmQhib6M9zGnmBH
An error clear is a reset that lands now (EF-8), not a guess at the
server's answer: `guess saveError := ""` worked only because the source
was given a constant question to revert to. The guide's action example,
the examples and the eval reference apps now write
`onFlush(() => { saveError := "" })`, and those error sources are
declared with `:=`. S-ai2-settings gains the flush instant.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWP7LmQhib6M9zGnmBH
@ryansolid
ryansolid merged commit c9177e3 into main Nov 11, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants