Implicit argument
An implicit argument is a function input supplied through invocation context, naming convention, or language mechanisms rather than explicitly at the call site.
Grokking Simplicity
A code smell in which a function's name encodes a value that would more appropriately be supplied explicitly as an argument.
- How it is used
- Detects duplication when function names encode varying fields or operations instead of exposing them as values.
- How deep it goes
- Explains recognition, four refactoring steps, validation, nested updates, and callbacks, but stops short of a full language-internals treatment.
- Examples
- Uses shopping-cart field setters, quantity and size incrementers, multiplication functions, and nested shirt options.
- What you can do after
- Diagnose/debug with it by spotting name-encoded differences and refactoring them into explicit, validated arguments.
Akka in Action, Second Edition
An implicit argument is a Scala method argument that the compiler can automatically supply from a compatible implicit value.
- How it is used
- Supplies Akka ask-operation parameters automatically, reducing repeated timeout arguments in asynchronous manager-worker workflows.
- How deep it goes
- Defines compiler lookup and demonstrates timeout insertion, but defers Scala’s broader implicit-scope rules.
- Examples
- Uses a manager parsing text through workers, with a three-second timeout and success-or-failure reports.
- What you can do after
- Apply it via Akka’s ask API by declaring a compatible implicit timeout and omitting that parameter from calls.
Read how Akka in Action, Second Edition explains implicit argument →
Related concepts
- code smellkind of · A code smell is a recognizable symptom in source code suggesting a potential design, implementation, or maintainability problem without necessarily indicating a defect.
- extract function argument refactoringaddressed by · A refactoring technique that moves varying behavior into a function argument so the surrounding function becomes reusable.
- explicit inputcontrasts with · An explicit input is a value supplied directly by a caller through an argument at a function's invocation site.
- compilerused by · A compiler is software that translates source code into executable code or another representation, while analyzing it according to the source language’s rules.
- identifierpart of · An identifier is a name or value that denotes or distinguishes an entity or program element within a system.
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.

