Repository navigation
Rename the optimistic statement to guess - #47
Merged
Merged
Conversation
`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
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
…-2sdg89 # Conflicts: # ref/oracle/lower.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Ryan · project thread
guess x := ereplacesoptimistic 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, andsourcestays as it is.Changes
ref/src/parse.ts,compiler/src/parse.rs):guessis now the keyword.optimisticstays reserved, and a line that uses it fails with the new parse codeOPTIMISTIC, whose hint namesguess. The hint is covered by a new section in guide/diagnostics.md and a rejected variant in S-parse-hints.OPTIMISTIC_OUTSIDE_HOLD→GUESS_OUTSIDE_HOLDOPTIMISTIC_NO_QUESTION→GUESS_NO_QUESTIONOPTIMISTIC_REVERTED→GUESS_REVERTEDguess.guess. AST kinds inside the compiler keep the nameoptimistic.eval/resultsand the preregistrations are left unchanged as historical records.Tests
npm test(interpreter): 122 passnpm run oracle: 122 pass, 0 fail, 14 recorded divergences (Solid next @ 2105ffb)npm run compiled: 122 pass, 0 fail, 14 recorded divergencesnpm run types: 168 passnpm run crate: 343/343 programs agree with ref/cargo test --release: passes, includingdiagnostics_pageNo scenario's result changed except S-parse-hints, which gains the
OPTIMISTICvariant.Generated by Claude Code