English Language & Usage Asked by Jeremyx on May 17, 2021
I’m a programmer and I often see the abbreviation ID (capitalized) in technical documents and code. Is this correct, or should it be id?
In English, both letters should be capitalized ("ID"). The lower case word "id" has a specific meaning that does not invoke the meaning "identifier," or "identification." In documentation it should be spelled out (ID abbreviates two different words, after all), or be in all caps.
However, programming languages are not exactly English. Styles vary widely. The de facto standard nowadays seems to be CamelCase, in which even identifiers such as acronyms capitalize the first letter only:
Id, myId, aSpecificId
But the whole question is prone to "religious wars" in the programming world, and there is no definitive answer. Some insist that the first letter always be capitalized, some the first letter only of following words (sometimes known as "camelCase" to distinguish from "PascalCase").
Answered by shipr on May 17, 2021
In common English, ID is used from common practice. In programming, though, it's sometimes id. The reason it's capitalized for common English is that there's no period at the end of the abbreviation, unlike abbreviations like tsp., lb., or abbr. Abbreviations also see demotion from capitalization by common use. Capitalization in programming isn't dictated by capitalization in common English but instead by the group of programmers. PascalCase or camelCase or snake_case, it comes down to preference and convention in the language.
Answered by calben on May 17, 2021
I agree common usage is ID. This is because ID is an abbreviation for identity document. So when ID is used for identifier it has an understood meaning. Language does evolve in this way.
On proper English. Identifier is only one word so I choose to use Id. Such as PhD, Mr, Ms, SciFi, Jr, Sr, Lt, Lt Col, and Prof. I'm sure more examples can be found.
The only counter example I can find is TV and even then I wouldn't be surprised if it evolved as well from a hyphen or two words.
If you're programming, as most people searching for this are, the way you spell it in code is determined by the coding standards put forth by your architect or lead.
Edit: Changed word acronym to abbreviation. The content still maintains such as in GMO, genetically modified organism. If anyone doesn't believe Identity Document is a thing, https://en.wikipedia.org/wiki/Identity_document where it will show that ID is used as an abbreviation for Identity Document.
Answered by BobbyJ on May 17, 2021
In English: ID has been arbitrarily chosen to be uppercase, only for convenience, only to distinguish it from the other meanings of the word "id". It is not an acronym like SQL, ASCII or NASA. (Strictly speaking it is incorrect, but now it is the convention.)
In programming, if the convention for your specific programming language is requiring camelCase or PascalCase, then you should simply use id or Id (eg: shopId, ShopId), and iD and ID are incorrect. Just like for SQL you should use sql or Sql.
Answered by Ellis on May 17, 2021
Although it might be logical to treat "id." as a straight-forward abbreviation for "identity" or "identifier", common usage is to both write and pronounce it as the two separate letters "I" and "D".
See for instance Lexico (based on Oxford dictionaries), the Guardian Style Guide (UK), Chambers, Merriam-Webster (note that some of these feature multiple terms spelled with variants of "id", "Id", etc, but all show "identity" abbreviated to "ID").
I can think of a few reasons why this might be, but have been unable to find evidence for any of them:
Whatever the reason, "ID" is the common spelling, and in that sense "correct".
As ever, there are exceptions to the rule:
Answered by IMSoP on May 17, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP