Skip to content

πŸ“ docs: Drop the reassignment section the language never had - #167

Merged
135yshr merged 2 commits into
mainfrom
claude/next-work-tasks-5b56lt
Sep 29, 2026
Merged

135yshr merged 2 commits into
mainfrom
claude/next-work-tasks-5b56lt

Conversation

@135yshr

@135yshr 135yshr commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Overview

The language spec had a "Reassignment" section with AssignStmt = identifier "=" Expr newline ., but Meow has no reassignment. A program that writes x = 5 after nyan x = 1 is refused with "Variable x already declared in this scope". The reference already says bindings are immutable.

This PR removes that section from docs/spec.md and from its website copy, website/content/doc/spec.md.

x = 42 for a name that isn't bound yet is still valid: the parser reads it as an implicit declaration. That form moves into the Variable Declaration grammar as a second VarStmt alternative:

VarStmt = "nyan" identifier [ TypeExpr ] "=" Expr newline
        | identifier "=" Expr newline .

It takes no type annotation, because x int = 1 doesn't parse. The section also says that writing x = ... for a name already bound in the same or an enclosing scope is a compile error, not a reassignment. The two spec files are still identical apart from their front matter.

Verification

  • go test ./docs/ passes, including TestTheWebsiteSaysWhatTheDocumentsSay, which checks that the spec and the website copy match.
  • go test ./... passes.
  • I ran meow run on three programs:
    • x = 42 followed by nya(x) prints 42.
    • x = 1 followed by x = 2 is refused.
    • x int = 1 fails to parse.
  • Nothing links to #reassignment, and AssignStmt appears nowhere else in the docs.

Impact

Documentation only. No code changes.

AI Session

https://claude.ai/code/session_01Scc7p1RecmFoikhcXwnTMu

Checklist

  • The docs and the website copy are updated together
  • Tests pass

πŸ€– Generated with Claude Code

https://claude.ai/code/session_01Scc7p1RecmFoikhcXwnTMu

The spec described AssignStmt, but a binding cannot be rebound: writing
x = 5 after nyan x = 1 is refused, and the reference already says
bindings are immutable. Remove the section from the spec and its
website copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Scc7p1RecmFoikhcXwnTMu
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
πŸ“ Code Review βœ… Completed 2026-09-28T06:59:54.047958Z bdec039 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with πŸ‘€ while any review is running, comments if it has suggestions, and reacts with πŸ‘ once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack β†’

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. πŸŽ‰

ℹ️ Recent review info
βš™οΈ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 5aa392e3-306f-4a09-9472-3ca6f1a1b469

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between bdec039 and f26e793.

πŸ“’ Files selected for processing (2)
  • docs/spec.md
  • website/content/doc/spec.md

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


πŸ“ Walkthrough

Walkthrough

Both specification documents now allow declarations without nyan when the name has no type annotation. They state that assigning to a name already bound in the same or an enclosing scope is a compile error, and remove the reassignment section.

Changes

Specification updates

Layer / File(s) Summary
Document declaration syntax
docs/spec.md, website/content/doc/spec.md
Both documents add the identifier = Expr declaration form, explain its use for untyped names, and include an example.
Document binding rules
docs/spec.md, website/content/doc/spec.md
Both documents state that assigning to a name already bound in the same or an enclosing scope is a compile error. They remove the reassignment grammar and description.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Merge Risk: βšͺ Minimal Β· up to f26e7

The documentation updates match the existing declaration and binding behavior; no merge-blocking issue is evident.

Architecture Summary

Architecture risk: πŸ”΅ Low Β· up to f26e7

The change affects 2 systems.

Changed systems: docs, website

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed β€” docs (service) was modified; 1 changed file maps to changed impact.
  • observed β€” website (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed β€” Modified behavior in docs/spec.md: The variable declaration grammar now permits identifier = Expr without nyan, while retaining the existing nyan form.
  • observed β€” Modified behavior in docs/spec.md: The declaration description now says nyan may be omitted for untyped names and that the omitted-keyword form declares a variable.
  • observed β€” Modified behavior in docs/spec.md: The examples now include a declaration written without nyan.
  • observed β€” Modified behavior in docs/spec.md: The specification now states that bindings cannot be rebound and that assigning to a name bound in the same or an enclosing scope is a compile error.
πŸš₯ Pre-merge checks | βœ… 5
βœ… Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage βœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check βœ… Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check βœ… Passed Check skipped because no linked issues were found for this pull request.
Title check βœ… Passed The title clearly identifies the primary change: removing the reassignment section from the language documentation.
Description check βœ… Passed The description includes the required Overview, Verification, Impact, AI Session, and Checklist sections. It explains the documentation changes, verification steps, affected areas, and test results. S…
✨ Finishing Touches
πŸ§ͺ Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share

A rabbit reads the syntax with care,
β€œNo nyan is needed here.”
Bound names stay where they have been,
No reassignment slips between.
The specs now tell the rules quite clear.

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bdec039ae0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/spec.md
x = 42 for a fresh name is still an implicit declaration, so the spec's
grammar has to derive it. Add it as a second VarStmt alternative, without
a type annotation, and say that a bound name cannot be rebound.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Scc7p1RecmFoikhcXwnTMu
@135yshr
135yshr merged commit 1ccc636 into main Sep 29, 2026
4 checks passed
@135yshr
135yshr deleted the claude/next-work-tasks-5b56lt branch September 29, 2026 05:52
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