ALL-FUNC1002 · effect_visibility
Judge whether a function makes its material effects apparent.
This is a contextual rule for all languages. Read its implementation.
Definition
Section titled “Definition”Compare names, return values, mutations, I/O, global access, transactions, and caller expectations. The rule judges surprise rather than forbidding side effects. The criteria independently establish a material effect, explicit disclosure, a query-like interface, and a protocol convention. Only query-like names need model judgment because command names already disclose that work may change external state.
Evidence
Section titled “Evidence”Findings cite writes, external calls, names, contracts, and affected callers.
Exceptions
Section titled “Exceptions”Python protocol methods and framework hooks may carry conventional effects that callers know.
Examples
Section titled “Examples”load_profile that silently updates a database is hidden. save_profile that commits one
documented transaction is explicit.
References
Section titled “References”- Cites “Clean Code”, Functions and side effects
- Cites “Command Query Separation”
- Cites “Programming Clojure”, values and explicit state