||The English used in this article or section may not be easy for everybody to understand. (December 2014)|
CamelCase (camel case, camel caps or medial capitals) is the practice of writing compound words or phrases so that each next word or abbreviation begins with a capital letter. CamelCase usually starts with a capital. When used in a programming language, it usually starts with a lowercase letter. Common examples are PowerPoint or iPhone.
- 1 Variations
- 2 History
- 3 Current usage in computing
- 4 Current usage in natural languages
- 5 Related pages
- 6 References
- 7 Other websites
Variations[change | change source]
There are many variations of CamelCase. A few important ones are:
History[change | change source]
Chemical formulae[change | change source]
The first use of medial capitals was the notation for chemical formulae invented by the Swedish chemist Berzelius in 1813. He did this to replace the large amount of naming and symbol systems used by chemists at that time. He suggested to show each chemical element by a symbol of one or two letters, the first one being capitalized. The capitalization allowed formulae like 'NaCl' to be written without spaces and still be read without confusion. This system is still in use today.
Early use in trademarks[change | change source]
- DryIce Corporation (1925)
- CinemaScope and VistaVision, rival widescreen movie formats (1953)
- ShopKo (1962)
- MisterRogers, the Canadian version of Mister Rogers' Neighborhood (1962)
- AstroTurf (1967)
Spread to mainstream usage[change | change source]
Despite its unclear origins inside the computing world, the practice spread in the 1980s and 1990s, when the personal computer became popular and exposed hacker culture to the world. CamelCase then became popular for business names. By 1990, it was very common to see CamelCase used in this way:
- (1962) PolyGram, formerly one of the major labels of the music industry.
- (1971) AeroVironment
- (1976) InterCity 125
- (1977) CompuServe, UnitedHealthCare (now UnitedHealthcare).
- (1978) WordStar
- (1979) MasterCard, SportsCenter, VisiCalc
- (1980) EchoStar
- (1982) MicroProse, WordPerfect
- (1983) NetWare
- (1984) BellSouth, LaserJet, MacWorks, iDEN
- (1985) PageMaker, EastEnders
- (1986) SpaceCamp
- (1987) ClarisWorks, HyperCard, PowerPoint
- (1990) HarperCollins, SeaTac, iconic WorldWideWeb
During the late 1990s when the internet became far more popular and easily available, the lowercase prefixes "e" (for "electronic") and "i" (for "Internet", "information", "intelligent", etc.) became quite common, and we began to see names like Apple's iMac and the eBox computer program.
History of the name "CamelCase"[change | change source]
The original name of the practice, used in media studies, grammars and the Oxford English Dictionary, was "medial capitals". The fancier names such as "InterCaps", "CamelCase" and other variations are pretty recent and seem more common in computer-related communities.
The earliest known occurrence of the term "InterCaps" on Usenet is in an April 1990 post to the group alt.folklore.computers by Avi Rappoport, with "BiCapitalization" appearing slightly later in a 1991 post by Eric S. Raymond to the same group. The earliest use of the name "CamelCase" occurs in 1995, in a post by Newton Love. "With the advent of programming languages having these sorts of constructs, the humpiness of the style made me call it HumpyCase at first, before I settled on CamelCase. I had been calling it CamelCase for years," said Love, "The citation above was just the first time I had used the name on USENET."
Current usage in computing[change | change source]
Programming and coding[change | change source]
The use of medial caps for identifiers is recommended by many organizations and software projects. For some languages (such as Mesa, Pascal, Modula, Java and Microsoft's .NET) CamelCase is recommended by the language developers or by important manuals and has therefore become part of the language's "culture".
Style guidelines often distinguish between upper and lower CamelCase. They usually specify which one should be used for certain kinds of things: variables, record fields, methods, procedures, types, etc. This is sometimes supported by static analysis tools that check source code to make sure it is following these guidelines.
[change | change source]
CamelCase is used in some wiki markup languages for terms that should be automatically linked to other wiki pages. This convention was originally used in Ward Cunningham's original wiki software, WikiWikiWeb, and can be activated in most other wikis. Some wiki engines such as TiddlyWiki, Trac and PMWiki use it in the default settings. They also usually provide an option or plugin to disable it. Wikipedia used to use CamelCase linking. However, they have switched to explicit link markup using square brackets and many other wiki sites have done the same. Some wikis that do not use CamelCase linking may still use the CamelCase as a naming convention, such as AboutUs.
Other uses[change | change source]
Most popular command-line interfaces and scripting languages usually can't handle file names that contain embedded spaces. Because of this, users of those systems often use to CamelCase (or underscores, hyphens and other "safe" characters) for compound file names like MyJobResume.pdf.
Microblogging and social networking sites that limit the number of characters in a message (most famously Twitter, where the 140-character limit can be quite restrictive in languages that rely on alphabets, including English) are usually outlets for medial capitals. Using CamelCase between words reduces the number of spaces, and thus the number of characters in a given message. This allows more content to fit into the limited space.
Current usage in natural languages[change | change source]
CamelCase has been used in languages other than English for several purposes. Some examples are:
Orthographic markings[change | change source]
CamelCase is sometimes used in the writing or translation of certain scripts as a way to tell the difference between ceratin letters or markings. An example is the rendering of Tibetan proper names like rLobsang: the "r" here stands for a prefix glyph in the original script that functions as tone marker rather than a normal letter. Another example is tsIurku, a Latin transcription of the Chechen term for the capping stone of the characteristic Medieval defensive towers of Chechenia and Ingushetia; the capital letter "I" here showing a phoneme different from the one transcribed as "i".
Inflection prefixes[change | change source]
CamelCase may also be used when writing proper names in languages that add prefixes to words. In some of those languages, the custom is to leave the prefix in lower case and capitalize the root.
This convention is used in Irish orthography as well as Scots Gaelic orthography; e.g., i nGaillimh ("in Galway"), from Gaillimh ("Galway"); an tAlbanach ("the Scottish person"), from Albanach ("Scottish person"); go hÉireann ("to Ireland"), from Éire ("Ireland).
Similarly, when translating the Hebrew language, haIvri means "the Hebrew person" and biYerushalayim means "in Jerusalem".
This convention is also used by several Bantu languages (e.g., kiSwahili = "Swahili language", isiZulu = "Zulu language") and several indigenous languages of Mexico (e.g. Nahuatl, Totonacan, Mixe–Zoque and some Oto-Manguean languages).
In abbreviations and acronyms[change | change source]
In French, CamelCase acronyms such as OuLiPo (1960) were favored for a time as alternatives to initialisms.
Honorifics within compound words[change | change source]
In several languages, including English, pronouns and possessives may be capitalized to show respect. For example: when referring to the reader of a formal letter or to God. In some of those languages, the capitalization is retained even when those words occur within compound words or suffixed to a verb. For example, in Italian one would write porgendoLe distinti saluti ("offering to You respectful salutations") or adorarLo ("adore Him").
Other uses[change | change source]
In German nouns carry a grammatical gender—which, for roles or job titles, is felt usually as masculine. Since the feminist movement of the 1980s, some writers and publishers have been using the feminine title suffixes -in (singular) and -innen (plural) to help boost the inclusion of women; but written with a capital 'I', to indicate that males are not excluded. Example: MitarbeiterInnen ("co-workers, male or female") instead of Mitarbeiter ("co-workers", masculine grammatical gender) or Mitarbeiterinnen ("female co-workers"). This use is analogous to the use of parentheses in English, for example in the phrase "congress(wo)man."
In German, the names to statutes are shortened using embedded capitals. An example would be: StGB (Strafgesetzbuch) for criminal code, PatG (Patentgesetz) for Patent Act or the very common GmbH (Gesellschaft mit beschränkter Haftung) for Company with Limited Liability.
Related pages[change | change source]
References[change | change source]
- Hayes, Brian (July–August 2006). "The Semicolon Wars". American Scientist Online: The Magazine of Sigma XI. The Scientific Research Society. art. pg. 2.. http://www.americanscientist.org/issues/pub/the-semicolon-wars/2.
- C# Coding Standards and Guidelines at Purdue University College of Technology
- "CamelCase". Everything2.com. http://everything2.com/title/CamelCase. Retrieved 4 June 2010.
- Style Guide for Python Code at www.python.org
- "compoundName". discussion thread at alt.folklore.computers. 29 March 1990. http://groups.google.com/group/alt.folklore.computers/browse_thread/thread/6099191f2c4e0984/21f332e5b813313e?#21f332e5b813313e.
- "[#APF-1088] If class name has embedded capitals, AppGen code fails UI tests and generated hyperlinks are incorrect. – AppFuse JIRA". Issues.appfuse.org. http://issues.appfuse.org/browse/APF-1088. Retrieved 4 June 2010.
- ASP Naming Conventions, by Nannette Thacker (05/01/1999)
- Iverson, Cheryl, et al. (eds) (2007). AMA Manual of Style (10th ed.). Oxford, Oxfordshire: Oxford University Press. ISBN 978-0-19-517633-9.
- Christine A. Hult and Thomas N. Huckin. "The Brief New Century Handbook – Rules for internal capitalization". Pearson Education. http://wps.ablongman.com/long_hult_bnch_4/63/16207/4149058.cw/content/index.html.
- "Brad Abrams : History around Pascal Casing and Camel Casing". Blogs.msdn.com. 3 February 2004. http://blogs.msdn.com/brada/archive/2004/02/03/67024.aspx. Retrieved 4 January 2014.
- "Pascal Case". C2.com. 27 September 2012. http://c2.com/cgi/wiki?PascalCase. Retrieved 4 January 2014.
- "NET Framework General Reference Capitalization Styles". Msdn2.microsoft.com. http://msdn2.microsoft.com/en-us/library/x2dbyw72(vs.71).aspx. Retrieved 4 January 2014.
- "WikiWord < TWiki < TWiki". Twiki.org. http://twiki.org/cgi-bin/view/TWiki/WikiWord. Retrieved 4 June 2010.
- "Wiki Case". C2.com. 8 February 2010. http://c2.com/cgi/wiki?WikiCase. Retrieved 4 June 2010.
- "String Utilities". 13 July 2007. http://sql2java.sourceforge.net/xref/net/sourceforge/sql2java/StringUtilities.html.
- Jöns Jacob Berzelius (1813). Essay on the Cause of Chemical Proportions and on Some Circumstances Relating to Them: Together with a Short and Easy Method of Expressing Them. Annals of Philosophy 2, 443-454, 3, 51-52; (1814) 93-106, 244-255, 353-364.
- Henry M. Leicester & Herbert S. Klickstein, eds. 1952, A Source Book in Chemistry, 1400-1900 (Cambridge, MA: Harvard)
- The Trade-mark Reporter. United States Trademark Association. 1930. ISBN 1-59888-091-8.
- ""MisteRogers" (1962)". Imdb.com. http://imdb.com/title/tt0250165/. Retrieved 4 January 2014.
- "Unitedhealthgroup.com". Unitedhealthgroup.com. http://www.unitedhealthgroup.com. Retrieved 4 January 2014.
- Farhad Manjoo (30 April 2002). "Grads Want to Study on EMacs, Too". Wired.com. http://www.wired.com/science/discoveries/news/2002/04/52181. Retrieved 4 June 2010.
- "The jargon file version 2.5.1 29 January 1991 follows in 15 parts – misc.misc | Google Groups". Groups.google.com. http://groups.google.com/group/misc.misc/msg/f5f25b79cd9026bd. Retrieved 23 May 2009.
- Newton Love View profile More options. "I'm happy again! – comp.os.os2.advocacy | Google Groups". Groups.google.com. http://groups.google.com/group/comp.os.os2.advocacy/msg/ab3c8107c6e150fa. Retrieved 23 May 2009.
- Newton Love
Other websites[change | change source]
|Wikimedia Commons has media related to: Camel case|
- Examples and history of CamelCase, also WordsSmashedTogetherLikeSo
- .NET Framework General Reference Capitalization Styles
- What's in a nAME(cq)?, by Bill Walsh, at The Slot
- The Science of Word Recognition, by Kevin Larson, Advanced Reading Technology, Microsoft Corporation
- OASIS Cover Pages: CamelCase for Naming XML-Related Components
- Convert text to CamelCase, Title Case, Uppercase and lowercase