Answer architecture round 3, stability round 1 and product-owner round 1: CalcName and proven.OfCalc for one meaning per name, a lazy load placed where its lookup found it, DataType's constants typed under it, and cover printing the module's total

This commit is contained in:
2026-10-05 15:53:56 +02:00
committed by Lillem4n
parent 679bd43c7c
commit 4f484cd780
11 changed files with 34 additions and 33 deletions
+4 -4
View File
@@ -43,9 +43,9 @@ type builtin struct {
prints datatype.DataType
}
// Calc is the name of the builtin whose operands the caller checks and proves, as nodes only
// it holds.
const Calc = "calc"
// CalcName is the builtin whose operands the engine checks and proves, since only the engine
// holds their nodes.
const CalcName = "calc"
// rng is the randomness a builtin sample draws from, which *drawstate.State satisfies.
type rng interface {
@@ -115,7 +115,7 @@ func numberCalls(text bool) string {
}
}
slices.Sort(calls)
return strings.Join(calls, ", ") + " or {calc()}"
return strings.Join(calls, ", ") + " or {" + CalcName + "()}"
}
func plural(n int) string {