From 8312b44a435c4c1d5c5561f707fda5aae1f9963c Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sat, 26 Sep 2026 15:32:44 +0200 Subject: [PATCH] Say a whole read draws the family apart, drop the decision the bare-reference one already states, and link the naming test to its decision --- AGENTS.md | 1 - README.md | 6 +++--- docs/decisions.md | 8 -------- family.go | 10 +++++----- naming_test.go | 1 + todo.md | 5 +++++ 6 files changed, 14 insertions(+), 17 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index cd7bb56..a5c182e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -71,7 +71,6 @@ In [docs/decisions.md](docs/decisions.md): - A selector is bracketed, and a dot inside it is literal - `parent` names the link column and the table alike - After a row, a path names a column or a linked table -- A table read into is pinned; a table read whole draws afresh - Every reference path into one family selects the same rows, per render and group - A parent row with no child row is a load error - The choice-of-rows fence guards a data file's root, and requires string fields diff --git a/README.md b/README.md index 01f76cf..ae5d18a 100644 --- a/README.md +++ b/README.md @@ -546,9 +546,9 @@ table another path in the group selects a row of, `{/city.name}` beside also refuses a link cell that is no key of the parent, a parent row no child links to, a chain of parents that closes, a table named like a column of any table above it, and a cell or format of a table that references a table of its own family, through -any template, a `repeat` or a `drawGroup` included, since a row rendered whole would -draw the family apart from itself: read the family from a template beside it, or add -the value as a column. A cell's reads are the render's too; which pairs are weighed +any template, a `repeat` or a `drawGroup` included, since a whole read of the table +would draw the family apart from the row it renders: read the family from a template +beside it, or add the value as a column. A cell's reads are the render's too; which pairs are weighed against each other is under [Decisions](docs/decisions.md#the-rows-of-a-table-are-alternatives). ### Options and fields diff --git a/docs/decisions.md b/docs/decisions.md index 721f41f..dd0f0d4 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -359,14 +359,6 @@ folder or another column name would be asking for a second spelling. today; admitting it later is additive, since a refused spelling gains a meaning and no accepted one changes, so the door stays open for the address records the plan describes. -## A table read into is pinned; a table read whole draws afresh - -A path into a table pins its row for the render and group, as a reference path pins its -level, and a bare `{/city}` draws a row each time and pins no row of its family, as a -bare reference does; so a bare table beside a path into its family is refused like a -bare reference beside a path into it. A bare table reference still counts as a read for -a `drawGroup`, since the group is what draws it apart from the family's pins. - ## Every reference path into one family selects the same rows, per render and group A selector pins rows for the render, and a read that draws freely before it could pin a diff --git a/family.go b/family.go index 3857e3a..938e9d1 100644 --- a/family.go +++ b/family.go @@ -145,7 +145,7 @@ func (r *tableRead) replay(d *pinSet) error { // checkFamilyPair refuses a table read whole beside a path into its family, and a // table one read draws that the other pins, since which token renders first would // then decide the row. -// docs/decisions.md#a-table-read-into-is-pinned-a-table-read-whole-draws-afresh +// docs/decisions.md#a-bare-reference-draws-each-time-a-reference-path-is-held func checkFamilyPair(a, b pathRead) error { for _, pair := range [][2]pathRead{{a, b}, {b, a}} { x, y := pair[0], pair[1] @@ -180,9 +180,9 @@ func (r *tableRead) drawnOf(pins *pinSet) *table { } // checkOwnFamily refuses a table's format or cell that reads, however many templates -// away and through a repeat or a draw group too, a table of its own family: a row -// rendered whole draws its row without pinning it, so the family would draw apart -// from the row being rendered, whichever draws the reaching template holds. +// away and through a repeat or a draw group too, a table of its own family: a whole +// read draws its row without pinning it, so the family would draw apart from the row +// it renders, whichever draws the reaching template holds. // docs/decisions.md#a-table-never-reaches-its-own-family-by-any-route func checkOwnFamily(t *template) error { own := t.table @@ -212,7 +212,7 @@ func checkOwnFamily(t *template) error { return renderEdge{}, nil, false } if e, head, found := find(t); found { - return fmt.Errorf("%s reads %s, a table of its own family, which a row of %s rendered whole would draw apart from; read the family from a template beside it, or add the value as a column", e.reached(), head.category, own.category) + return fmt.Errorf("%s reads %s, a table of its own family, which a whole read of %s would draw apart from the row it renders; read the family from a template beside it, or add the value as a column", e.reached(), head.category, own.category) } return nil } diff --git a/naming_test.go b/naming_test.go index 53cc589..f73e58b 100644 --- a/naming_test.go +++ b/naming_test.go @@ -8,6 +8,7 @@ import ( "testing" ) +// docs/decisions.md#one-name-one-meaning func TestNoFunctionSpellsAMethod(t *testing.T) { funcs, methods := declaredCalls(namespaceFiles(t)) names := make([]string, 0, len(funcs)) diff --git a/todo.md b/todo.md index f323474..5a91cc3 100644 --- a/todo.md +++ b/todo.md @@ -47,6 +47,11 @@ This round, in order: where `NewTemplate` and `NewRecordTemplate` do not, and `List` claims to be every path `Fake` accepts, which a selector is too. Delete the dead `table.descends` and the redundant `string(key)` in `checkNoRepeatedItem`. +- Keep only the standing choice in the decision "The rows of a table are alternatives", + a choice's items refused as alternatives, and give it the goal it serves: the rest + defines `alternatives`, which its comment in `family.go` already does, and the README's + "which pairs are weighed against each other" sends a reader to the log for that + definition. - Run the nine-seat panel again and file what it names here. ### Data