Implicit input
An implicit input is a dependency on surrounding state or context that affects a computation without appearing as an explicit function argument.
Grokking Simplicity
An input obtained by a computation from surrounding state or context rather than supplied explicitly as a function argument.
- How it is used
- Uses implicit inputs to distinguish actions from calculations and guide incremental improvements to function design.
- How deep it goes
- Explains hidden reads, global-state coupling, and argument conversion through worked shopping-cart refactorings; it stops short of eliminating all actions.
- Examples
- Demonstrates shopping carts, shipping icons, tax calculations, DOM updates, and asynchronous cart totals.
- What you can do after
- Diagnose/debug with it by locating hidden global reads and converting them into arguments to improve reuse and testability.
Unit Testing Principles, Practices, and Patterns
A hidden input is an implicit dependency on internal or external state that affects a computation without appearing as an explicit argument.
- How it is used
- Defines hidden state as a criterion for separating business logic from side effects and selecting an appropriate unit-testing style.
- How deep it goes
- Explains the definition, testing consequence, and database refactoring trade-off, but stops short of implementation details beyond the method signature.
- Examples
- Uses Increment with internal state and AuditManager.AddRecord with a database dependency to contrast explicit and hidden inputs.
- What you can do after
- Diagnose hidden dependencies, predict when output-based testing becomes unavailable, and choose between eager data gathering and delegated lookup.
Read how Unit Testing Principles, Practices, and Patterns explains implicit input →
Related concepts
- explicit inputalternative to · An explicit input is a value supplied directly by a caller through an argument at a function's invocation site.
- command-line argumentalternative to · A command-line argument is a value supplied to a program when it is invoked, either as positional input or as an option that configures its behavior.
- actionused by · An action is a choice or operation selected or performed by an actor that can affect a system or environment or produce an outcome.
- mathematical calculationcontrasts with · A mathematical calculation is an operation or expression that derives a result from one or more input values.
- global variableused by · A global variable is a variable whose binding is accessible from broad program or module scope according to the language’s name-resolution rules.
- testabilitycontrasts with · Testability is the degree to which a system’s behavior can be exercised and evaluated effectively, efficiently, and reliably through testing.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

