Name every Fake receiver and fold the function-method rule into its test in the one-name decision
This commit is contained in:
+9
-9
@@ -309,15 +309,15 @@ file the stem of the units it holds.
|
|||||||
|
|
||||||
## One name, one meaning
|
## One name, one meaning
|
||||||
|
|
||||||
Two declarations of any kind — function, method, field, type — share a name only where
|
Two declarations of any kind — function, method, field, type — share a name only where one
|
||||||
one definition covers both: the same kind of value, counted or addressed the same way, so
|
definition covers both: the same kind of value, counted or addressed the same way, so a
|
||||||
a reader landing on the wrong one concludes nothing false. `Fake` on each template kind
|
reader landing on the wrong one concludes nothing false. `Fake` renders one value on
|
||||||
renders one value from what it is called on; `renderScope.groupHold` returns the `*groupHold` it
|
`Generator`, `Template` and `RecordTemplate`; `renderScope.groupHold` returns the
|
||||||
names. A bare function never shares a name with a method: a search for the name returns
|
`*groupHold` it names. `TestNoFunctionSpellsAMethod` keeps a bare function off a method's
|
||||||
both, and a call site shows no receiver to tell them apart. `TestNoFunctionSpellsAMethod`
|
name, since a search returns both and a call site shows no receiver; review judges the
|
||||||
holds that, and review judges the rest. Serves goal 2: names that tell the truth, and reaching
|
rest. Serves goal 2: names that tell the truth, and reaching the unit behind a symptom
|
||||||
the unit behind a symptom without asking a person. Decided 2026-09-25 by Lilleman; valid
|
without asking a person. Decided 2026-09-25 by Lilleman; valid while goal 2 counts reading
|
||||||
while goal 2 counts reading cost.
|
cost.
|
||||||
|
|
||||||
## The package stays flat
|
## The package stays flat
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user