LobstersJun 19, 2026, 3:22 PM5

Stop Naming Your Variables "Flag": The Art of Boolean Prefixes

A software engineer explains how to name boolean variables clearly using four prefixes — is, has, can, and should — to eliminate ambiguity and prevent bugs in codebases.

Photograph: Lobsters
Read original at Lobsters

Share this story

Send it to someone who should see it.

0 comments

Sign in to join the discussion.