From 44a824ccf5f009e2f488c0c5da27253a6c277f1d Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 25 Sep 2026 18:15:21 +0200 Subject: [PATCH] Decide one name, one meaning, and file the names that break it --- AGENTS.md | 2 +- docs/decisions.md | 15 +++++++++------ todo.md | 5 +++++ 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index a2a2f82..6f7c33c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -64,7 +64,7 @@ In [docs/decisions.md](docs/decisions.md): - A typed column's calc is refused unless proven - `Column` carries text, not a Go value - `hold` names what a draw is kept in, `draw` the draw itself -- A function may not spell a method; two types may +- One name, one meaning - The package stays flat - The performance gate asserts allocations, not wall-clock time - Rows live in a TSV, the shape in JSON diff --git a/docs/decisions.md b/docs/decisions.md index be26579..a50f7d6 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -307,13 +307,16 @@ writes as the load check proved it; a `Value any` would hand every caller a type Goal 2 wants a name to reach one unit, so a unit takes the stem of what it is, and a file the stem of the units it holds. -## A function may not spell a method; two types may +## One name, one meaning -A call writes a method with its receiver and a function bare, so one name on both greps -as one unit, which is the reaching cost goal 2 counts, while the receiver before a -shared method name says which type answers. `TestNoFunctionSpellsAMethod` holds it. A -type is outside the rule: `renderScope.hold` answers with a `*hold`, so the two spell -one unit, which no test can judge. +Two declarations of any kind — function, method, field, type — share a name only where +they name one thing: an interface's method, `Fake` on each template kind, a field +holding what a same-named method returns, `renderScope.hold` answering with a `*hold`. +A bare function never shares a name with a method, since grep cannot tell a bare call +from a method's; `TestNoFunctionSpellsAMethod` holds that, and review judges the rest, +which is meaning no test can see. Serves goal 2: names that tell the truth, and reaching +the unit behind a symptom without asking a person. Decided 2026-09-25 by Lilleman; valid +while goal 2 counts reading cost. ## The package stays flat diff --git a/todo.md b/todo.md index e8de440..9f82197 100644 --- a/todo.md +++ b/todo.md @@ -22,6 +22,11 @@ This round, in order: - Hold only the `{token}` grammar's tests in `format_test.go`: move the helpers seven other test files use (`engine`, `parse`, `compiled`, `mustRender`) and the weight, recursion and path-navigation tests to files named for what they test. +- Give `rows` and `field` one meaning each, per the decision "One name, one meaning": + `categoryFiles.rows` returns a TSV file name where `table.rows` counts rows, and + `formatOps.field` compiles a `{field}` token where `structFields.field` reads a Go + struct field. Rename every other shared name that names two things — `walk`, + `column`, `expr` and `of` included. - Run the nine-seat panel again and file what it names here. ### Data