api-guidelines icon indicating copy to clipboard operation
api-guidelines copied to clipboard

Two letter acronym guidance

Open corranrogue9 opened this issue 3 years ago • 1 comments

In our naming guidelines, we say this about two-letter acronyms:

☑️ SHOULD case two-letter acronyms with the same case.

We also don't say anything specific about two-letter abbreviations. I think for ID (which is arguable if it's an acronym or an abbreviation, but I don't think it matters here) we have the general pattern of something like myId rather than myID. I also think that we do the same for other two-letter tokens. I suggest that we either remove this naming convention, or we specifically call out that ID should not follow this pattern.

corranrogue9 avatar Oct 11 '22 17:10 corranrogue9

@OlgaPodo Continuing this discussion from the PR, I think that the guidance should ultimately say (ignoring whatever it currently says) that abbreviations should be avoided, and that acronyms (no matter the length) are to be camel-cased just like anything else. I'm using my above example of "ID" as the biggest motivator for my suggestion. I don't really think that we would be changing the guidance, I think that we would be aligning the guidance docs with what we actually suggest.

corranrogue9 avatar Oct 02 '23 17:10 corranrogue9