Matthew Boston

Explicit Is Better Than Implicit

March 26, 2025

The Zen Got It Right

“Explicit is better than implicit” is one of the core principles from the Zen of Python, but like flat over nested and sparse over dense, it applies to all software. It’s a statement about communication. Code that states its intent directly is code that can be understood, maintained, and trusted.

Implicit code does the opposite. It asks the reader to know things that aren’t written down – conventions, defaults, inherited behavior, environmental assumptions. Every implicit decision is a gap the reader has to fill with their own knowledge. Some readers won’t have that knowledge. Some will guess wrong.

The Cost of Going Implicit

Implicit code feels convenient at first. You save a few keystrokes. You lean on framework magic. You trust that the next reader will just know how things work. Then someone new joins the team, and they don’t.

The costs show up in predictable ways:

  • Debugging takes longer. When behavior is implicit, you can’t just read the code to understand what’s happening. You have to trace through framework internals, check configuration files, and reconstruct the hidden control flow.
  • Onboarding slows down. New team members have to learn the invisible rules before they can be productive. The more implicit knowledge a codebase requires, the steeper the learning curve.
  • Bugs hide in assumptions. Implicit defaults change between versions. Implicit type coercions produce surprising results. Implicit ordering dependencies break when someone adds a step in the wrong place.

Every implicit decision is a bet that the reader will have the same context you have right now. That bet loses more often than you’d think.

Where Explicitness Pays Off

Explicitness matters most at the boundaries – the places where different parts of a system communicate.

Naming. A function called process tells you nothing. A function called validate_and_normalize_email tells you exactly what it does. Explicit names eliminate guesswork.

Configuration. Explicit configuration files beat convention-over-configuration when the conventions aren’t well-known. If your team has to look up what the default is, it should be stated.

Error handling. Explicit error handling – checking return values, catching specific exceptions, validating inputs at boundaries – prevents the silent failures that implicit error handling allows.

Dependencies. Explicit imports and dependency declarations make it clear what a module needs. Implicit dependency injection or service locators hide relationships that matter for understanding and testing.

Types. Type annotations make contracts visible. When a function signature says it takes a string and returns an int, the reader doesn’t have to infer the contract from usage patterns. The code documents itself.

Explicit Doesn’t Mean Verbose

There’s a common objection: “Explicit code is too verbose.” But explicitness and verbosity are different things. Verbose code adds words without adding information. Explicit code adds exactly the information that would otherwise be hidden.

A ten-line function with clear names and explicit error handling isn’t verbose. A one-liner that relies on three implicit type conversions and a default parameter buried in a framework isn’t concise – it’s obscure.

The goal isn’t to write more code. It’s to write code where intent is visible without external context.

Explicitness Scales

In a small codebase maintained by one person, implicit conventions work fine. You wrote the conventions. You remember them. But codebases grow. Teams change. The conventions that felt obvious to three people become tribal knowledge that twenty people struggle to reconstruct.

Explicit code doesn’t require shared tribal knowledge to understand. It carries its own context. That’s what makes it resilient to team changes, context switches, and the long gaps between when code is written and when it’s read.

Code quality starts with making intent visible. Explicit code is the most direct way to get there.


Make the implicit explicit. Your code should say what it means without making the reader guess.

This article was originally posted on LinkedIn.