14

Lazy Element


Symptom

A class, function, or namespace that exists but does nothing meaningful — a one-line wrapper, an empty subclass, a passthrough method.

Goal

Trivial wrappers disappear; the call site says exactly what's happening.

Smellier version
function getName(user) {
  return user.name;
}
const n = getName(user);
Fresher version
const n = user.name;
Savings

Shorter call chains, less indirection to unwrap when reading; one fewer file to maintain.

Note

Reader pays a navigation cost to discover the wrapper adds nothing; future changes are tempted to add real work to it.