liveBook · Manning

Explicit input

An explicit input is a value supplied directly by a caller through an argument at a function's invocation site.

How 2 Manning books explain it

Grokking Simplicity

An input to a function that is supplied directly at the call site through an argument or parameter.

How it is used
Makes a function's dependencies visible while supporting extraction, reuse, testing, and generalization.
How deep it goes
Defines explicit inputs, demonstrates dependency conversion, and gives a four-step refactoring procedure; it stops short of language internals.
Examples
Uses shopping-cart functions, field-update functions, nested options, and JavaScript array copying to expose hidden inputs.
What you can do after
Apply it via JavaScript refactoring by identifying hidden dependencies, adding arguments, changing function bodies, and updating callers.

Read how Grokking Simplicity explains explicit input →

Data-Oriented Programming: Reduce software complexity

An explicit argument is a value directly supplied by the caller in a function invocation.

How it is used
Uses explicit arguments to keep data-oriented module functions stateless and make their manipulated data visible.
How deep it goes
Explains the contrast with implicit object state, demonstrates a method signature, and stops short of execution internals.
Examples
Uses a Library getBookLendings signature and contrasts JavaScript-style this access with Python’s self parameter.
What you can do after
Apply data-oriented programming by redesigning module functions to accept their manipulated data explicitly.

Read how Data-Oriented Programming: Reduce software complexity explains explicit input →

Related concepts

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.