Skip to content

ALL-FUNC1002 · effect_visibility

Judge whether a function makes its material effects apparent.

This is a contextual rule for all languages. Read its implementation.

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.

Findings cite writes, external calls, names, contracts, and affected callers.

Python protocol methods and framework hooks may carry conventional effects that callers know.

load_profile that silently updates a database is hidden. save_profile that commits one documented transaction is explicit.

  • Cites “Clean Code”, Functions and side effects
  • Cites “Command Query Separation”
  • Cites “Programming Clojure”, values and explicit state