Implicit input
An implicit input is a dependency on 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
- command-line argumentalternative to · A command-line argument is a value or option supplied to a program when it is invoked, providing input or affecting its behavior.
- explicit inputalternative to · An explicit input is a value supplied directly by a caller through an argument at a function's invocation site.
- actionused by · An action is a choice or operation selected or performed by an actor that can affect a system, environment, or process.
- 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 scopes according to the language’s name-resolution rules.
- testabilitycontrasts with · Testability is the degree to which software behavior or properties can be effectively and reliably evaluated through testing.
Questions about implicit input
What is implicit input?
An implicit input is a dependency on state or context that affects a computation without appearing as an explicit function argument.
Which Manning books explain implicit input?
Grokking Simplicity and Unit Testing Principles, Practices, and Patterns.
What is the difference between implicit input and command-line argument?
An implicit input is a dependency on state or context that affects a computation without appearing as an explicit function argument. A command-line argument is a value or option supplied to a program when it is invoked, providing input or affecting its behavior.
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.

