<!--
title: Follow Swift naming conventions
domain: ml-systems
topic: Naming Conventions
language: Swift
source: tensorflow/swift
updated: 2019-10-11
url: https://awesomereviewers.com/reviewers/swift-follow-swift-naming-conventions/
-->

Ensure code follows established Swift naming conventions and remains consistent with domain terminology:

1. Use standard Swift parameter labels (e.g., use `named:` instead of `called:`):
```swift
// Incorrect
func expectOne<T>(called name: String, among candidates: [T]) throws -> T { ... }

// Correct
func expectOne<T>(named name: String, among candidates: [T]) throws -> T { ... }
```

2. Organize functions as methods on relevant types when appropriate:
```swift
// Less idiomatic
public func operandNames(for inst: Instruction) -> [String]? { ... }

// More idiomatic
extension Instruction {
    public var operandNames: [String]? { ... }
}
```

3. Use domain-specific terminology consistently (e.g., "operand names" not "registers" in SIL context)

4. Avoid redundancy in type names, especially in enum cases:
```swift
// Redundant
public indirect enum Type {
    case addressType(_ type: Type)
}

// Concise
public indirect enum Type {
    case address(Type)
}
```

5. Maintain consistency with existing codebase conventions (e.g., using `inst` instead of `instr` for variables if that's the established pattern)
