DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk4 min

The Wilson Else Rule: When a Nested Branch Needs an Explicit Answer

The Wilson Else proposes flagging nested, fallthrough if statements—not every missing else—as a prompt to clarify whether the false path is intentionally inert.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The Wilson Else is an experimental linting proposal for one narrow case: a nested if branch does work, then continues without an else to show what the false path means. It is not an established standard or a proven bug detector. Its value is as a review prompt for consequential code where doing nothing may itself be an important decision.

What the Wilson Else asks a reviewer to notice

Regis Wilson’s proposal focuses on an omitted path that can be easy to overlook: inside a nested decision, the true branch performs work and falls through, while the false branch has no explicit treatment. The proposal’s central idea is that a meaningful branch should handle the other case, return before that case matters, or explicitly acknowledge that nothing happens.

As an Amazon Associate I earn from qualifying purchases.

This is a reviewability rule, not a claim that every missing else is a defect. A reviewer seeing the explicit alternative can ask whether the no-op is intentional, whether another action is needed, or whether the code should be restructured. As Wilson puts it, “An autofix also cannot prove that a human considered the false path; at most, it can put that path in front of one.”

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why a blanket missing-else rule would be noisy

Many one-sided conditions are already clear. A guard clause that returns or throws ends the path, so the code after it naturally represents the valid case. A conditional accumulation or formatting operation may also need no alternate action. Inserting an empty else in these situations can add ceremony without clarifying behavior.

The proposal therefore narrows its target to nested, fallthrough if statements. In the prototype described by Wilson, ordinary unnested conditions and terminating guards are ignored, and an existing else means the decision is already explicit. An else if chain is treated as one decision rather than a series of unrelated omissions.

Where explicit inaction may matter

The case for the rule is strongest in stateful, side-effecting code, where inaction can leave a system in a consequential state. Wilson points to areas such as authorization, deployment orchestration, cloud cleanup, schema generation, state machines, workflow transitions, billing, and security-sensitive routing. In these domains, an omitted branch may leave a reviewer wondering whether a transition or cleanup step was deliberately skipped.

Nesting is a useful attention cue, but it is not a reliable measure of risk. A nested pure transformation may be harmless, while a top-level branch that mutates production infrastructure may deserve scrutiny. The rule’s scope is best understood as a way to focus review effort, not as a ranking of every conditional by danger.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What the prototype does—and what it cannot establish

Wilson’s experimental implementation is an ESLint rule with a TypeScript-oriented example configuration that enables mode: 'nested' and disables an optional conditional-logging check. Its autofix inserts an else containing // TODO: nothing. These are features of that prototype, not guarantees of ESLint itself or evidence of a mature, independently validated package.

The marker is intentionally provocative: it makes the author or reviewer choose whether the alternate path is genuinely inert. But an empty branch can become ritualized noise or permanent debt. A team might instead handle the alternative, turn the condition into a guard clause, or use an exhaustive transition structure that represents all relevant states.

Conditional logging is treated as a separate concern in the proposal. Logging policy often belongs in logger configuration, although a conditional log can make sense when the condition determines whether an event is noteworthy. The prototype’s syntactic heuristic should not be assumed to recognize every logging API or understand the semantics of each condition.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How to evaluate the rule without turning it into ceremony

The proposal does not report a completed evaluation, measured precision or recall, or demonstrated bug-prevention results. A team considering it can begin with a report-only trial on code where omitted actions have operational meaning, then classify findings before deciding whether to enforce anything.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Run it in report-only mode. Avoid making the rule a blocking check while you learn what it flags in your codebase.
  2. Classify each finding. Record whether it is harmless accumulation, an intentional no-op, unclear intent, or a genuine missing behavior.
  3. Look for useful patterns. Check whether actionable findings correlate with nesting, side effects, mutation, or a particular domain; do not assume nesting alone explains their value.
  4. Refine or discard the rule. Keep it only if the findings improve review decisions enough to justify the added syntax and maintenance.

In review, a concise prompt such as “Check your unrealized else here” can invite an explanation without treating the missing keyword as proof of a bug. Wilson describes the idea as an experiment, not a law.

The practical verdict

The Wilson Else is a plausible local review aid for nested branches in stateful code, where an unshown false path may conceal an important operational choice. It is not evidence that every such branch is wrong, and adding else does not prove the decision was understood. Its success depends on whether a report-only trial surfaces useful questions rather than empty branches and routine debt.

Source: Regis Wilson, “The Wilson Else: A Linter for Branches That Pretend Nothing Happened,” September 22, 2026. The article is hosted by World Programming Systems and identifies Dev.to as the original publication.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.