Choose names that are both semantically accurate and consistent with established patterns. Names should clearly convey their purpose, data type, and behavior while following existing conventions in the codebase and upstream dependencies.

Key principles:

Example:

// Better: Descriptive and indicates return type
std::optional<std::string_view> CheckSwitchNameValid(std::string_view key) {
  if (!std::ranges::none_of(key, absl::ascii_isupper))
    return "Switch name must be lowercase";
  return {};
}

// Better: Plural name for collection parameter
void OnWindowEndSession(const std::vector<std::string> reasons) {
  // ...
}