Skip to content

Clarify acronym capitalization rules in declaration names#4678

Merged
daniCsorbaJB merged 2 commits intomasterfrom
clarify-capitalization-for-acronyms
Jan 30, 2025
Merged

Clarify acronym capitalization rules in declaration names#4678
daniCsorbaJB merged 2 commits intomasterfrom
clarify-capitalization-for-acronyms

Conversation

@daniCsorbaJB
Copy link
Contributor

This update is related to issue asking to clarify capitalization rules for declaration names with acronyms KT-74339

@daniCsorbaJB daniCsorbaJB requested a review from a team as a code owner January 27, 2025 09:54
@AlejandraPedroza AlejandraPedroza self-requested a review January 30, 2025 12:17
@AlejandraPedroza AlejandraPedroza self-assigned this Jan 30, 2025
Copy link
Contributor

@AlejandraPedroza AlejandraPedroza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall is clearer! I left a suggestion to make the two cases easier to find.


When using an acronym as part of a declaration name, capitalize it if it consists of two letters (`IOStream`);
capitalize only the first letter if it is longer (`XmlFormatter`, `HttpInputStream`).
When using an acronym as part of a declaration name, write two-letter acronyms in uppercase, such as `IOStream`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall it's clear. We can use parallelism (considering we're comparing 2 cases) to make it easier to read and scan. For example:

When using an acronym as part of a declaration name, follow these rules:

  • For two-letter acronyms, use uppercase for both letters. For example, IOStream.

  • For acronyms longer than two letters, capitalize only the first letter. For example, XmlFormatter or HttpInputStream.

This is a suggestion, feel free to adjust it according to your perspective.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it - let's go with your version! 👍

@daniCsorbaJB daniCsorbaJB merged commit 11b8d55 into master Jan 30, 2025
4 checks passed
@daniCsorbaJB daniCsorbaJB deleted the clarify-capitalization-for-acronyms branch January 30, 2025 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants