Back to all reviewers

Semantic name clarity

ghostty-org/ghostty
Based on 4 comments
Swift

Names should clearly and accurately reflect the purpose of variables, methods, and other identifiers. Follow these principles: 1. Use descriptive, specific names that convey exact purpose

Naming Conventions Swift

Reviewer Prompt

Names should clearly and accurately reflect the purpose of variables, methods, and other identifiers. Follow these principles:

  1. Use descriptive, specific names that convey exact purpose
  2. For booleans, prefer positive phrasing with ‘is’ prefix when appropriate
  3. Update names when functionality changes
  4. Follow established platform conventions (e.g., AppKit notification naming patterns)

Example 1: Instead of:

var macosHidden: Bool

Use:

var isAppIconHiddenFromMacOS: Bool

Example 2: When a function’s responsibility expands:

// Before: only hides elements
func hideCustomTabBarViews() {
    // hide some elements
}

// After: both hides and shows elements
func resetCustomTabBarViews() {
    // hide some elements
    // show other elements
}

Example 3: For notification naming, follow consistent patterns:

// Avoid inconsistent patterns
static let ghosttyToggleMaximize = Notification.Name(...)

// Follow "[Subject] [Event (past participle)]" pattern
static let ghosttyFullscreenDidToggle = Notification.Name(...)
4
Comments Analyzed
Swift
Primary Language
Naming Conventions
Category

Source Discussions