-
Notifications
You must be signed in to change notification settings - Fork 7
Improve some names of generic type parameters and associated types #271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis update systematically renames generic type parameters across multiple files for improved clarity and consistency. Specifically, generic placeholders such as Changes
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (8)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (7)
⏰ Context from checks skipped due to timeout of 90000ms (24)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Swift encourages the use of descriptive names instead of single letters. From the Swift book [1]: > In most cases, type parameters have descriptive names, such as Key and > Value in Dictionary<Key, Value> and Element in Array<Element>, which > tells the reader about the relationship between the type parameter and > the generic type or function it’s used in. However, when there isn’t a > meaningful relationship between them, it’s traditional to name them > using single letters such as T, U, and V, such as T in the > swapTwoValues(_:_:) function above. So I've used my judgement here a bit and renamed some things and left some as single letters. [1] https://docs.swift.org/swift-book/documentation/the-swift-programming-language/generics/
1eb1ee0 to
1f5ab96
Compare
Swift encourages the use of descriptive names instead of single letters. From the Swift book:
So I've used my judgement here a bit and renamed some things and left some as single letters.
Summary by CodeRabbit