Take the 2-minute tour ×
English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

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 "CamelCase", [sic] and so on and so forth.

share|improve this answer
Thanks. I'm not concerned with the programming world so much, but proper English usage. (BTW -- most C/C++ libraries do NOT use camel case style, so I would not say this is NOT the de facto style standard...) :-) –  Jeremyx Jan 23 '13 at 20:15
add comment

In common English, ID is used from common practice. In programming, though, it's id. Why? We use is so much!

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. This is what happened to id in programming.

share|improve this answer
I am a programmer, and have been for decades, but I have never once used id. Not even in source code, let alone in the documentation. It's always ID. Same for my colleagues. So I'd like to see your statement backed up with actual data. Otherwise it's just your anecdotal evidence vs. my anecdotal evidence. –  RegDwigнt Jan 23 '13 at 21:16
Hard thing to find. It must be just anecdotal evidence. I'd never seen id capitalized ID before, but almost all of my experience in programming has been academic, either research programming or otherwise academic programming. It may be one of those academic vs corporate coding differences I seem to discover all the time. –  Calem Bendell Jan 23 '13 at 22:40
I don't think you're going to get much anything other than anecdotal 'evidence' on this one though. The answer to the original question is that it can be either. I've seen more of id in my programming experience. –  Calem Bendell Jan 23 '13 at 22:43
The Java libraries (which became something of a de facto standard) use mixed case even for acronyms that are usually all caps. So: transactionId, cf. siteUrl. C and C++ programmers not influenced by Java would have transactionID or transaction_id, or, for the hard core, x. My preference is for the all caps version even in Java. Outside source code I would always set in all caps, to avoid confusion with the Freudian construct. –  Andrew Lazarus Jan 24 '13 at 21:29
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.