---
title: Boolean Names Is/Has/Should
impact: HIGH
impactDescription: makes conditions instantly readable
tags: naming, booleans, readability, quality
---

## Boolean Names Is/Has/Should

Boolean prefixes make conditions instantly readable.

**Incorrect (unclear boolean names):**

```go
active := user.Status == "active"
admin := checkAdminRole(user)
items := len(cart) > 0
update := needsRefresh()
```

**Correct (boolean prefixes):**

```go
isActive := user.Status == "active"
isAdmin := checkAdminRole(user)
hasItems := len(cart) > 0
shouldUpdate := needsRefresh()
canEdit := hasPermission(user, "edit")
willExpire := expirationDate.Before(time.Now())
```

**Boolean prefixes:**

| Prefix | Use For |
|--------|---------|
| `Is` | State (IsActive, IsEnabled) |
| `Has` | Ownership (HasPermission, HasError) |
| `Should` | Decision (ShouldUpdate, ShouldRetry) |
| `Can` | Capability (CanEdit, CanDelete) |
| `Will` | Future (WillExpire, WillRetry) |

**Tools:** Linter, Code Review
