Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Camel case
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|Writing words with internal uppercase letters}} {{Use dmy dates|date=May 2016}} {{Use American English|date=January 2023}} [[File:CamelCase new.svg|alt=|thumb|Camel case is named after the hump of its protruding capital letter, similar to the hump of common [[camel]]s.]] The writing format '''camel case''' (sometimes stylized [[autological|autologically]] as '''camelCase''' or '''CamelCase''', also known as '''camel caps''' or more formally as '''medial capitals''') is the practice of writing phrases without spaces or punctuation and with [[capitalization|capitalized]] words. The format indicates the first word starting with either case, then the following words having an initial uppercase letter. Common examples include ''YouTube'',<ref>{{cite book |last1=Fogarty |first1=Mignon |title=The Grammar Devotional: Daily Tips for Successful Writing from Grammar Girl |date=27 October 2009 |publisher=St. Martin's Publishing Group |isbn=978-1-4299-6440-1 |page=14 |url=https://books.google.com/books?id=gDUMufuiqjAC&dq=PayPal&pg=PA14 |language=en}}</ref> ''PowerPoint'', ''HarperCollins'', ''FedEx'', ''iPhone'', ''eBay'',<ref>{{cite book |last1=Brown |first1=Adam |title=Understanding and Teaching English Spelling: A Strategic Guide |date=21 September 2018 |publisher=Routledge |isbn=978-1-351-62186-1 |pages=173–174 |url=https://books.google.com/books?id=lEBvDwAAQBAJ&dq=HarperCollins%20%22camel%20case%22&pg=PT173 |language=en}}</ref> and ''LaGuardia''.<ref>{{cite book |last1=Dreyer |first1=Benjamin |title=Dreyer's English: An Utterly Correct Guide to Clarity and Style |date=4 August 2020 |publisher=Random House Publishing Group |isbn=978-0-8129-8571-9 |page=228 |url=https://books.google.com/books?id=0FbXDwAAQBAJ&dq=iphone%20%22camel%20case%22&pg=PA228 |language=en}}</ref> Camel case is often used as a [[Naming convention (programming)|naming convention]] in computer programming. It is also sometimes used in online usernames such as ''JohnSmith'', and to make multi-word [[domain names]] more legible, for example in promoting ''EasyWidgetCompany.com''. The more specific terms '''Pascal case''' and '''upper camel case''' refer to a joined phrase where the first letter of each word is capitalized, including the initial letter of the first word. Similarly, '''lower camel case''' (also known as '''[[dromedary]] case''') requires an initial lowercase letter. Some people and organizations, notably [[Microsoft]], use the term ''camel case'' only for lower camel case, designating Pascal case for the upper camel case.<ref name=nfrmwk /> Some programming styles prefer camel case with the first letter capitalized, others not.<ref>{{cite web |title=Naming Conventions |url=http://docs.scala-lang.org/style/naming-conventions.html |publisher=Scala |access-date=5 December 2012}}</ref><ref name=nfrmwk>{{cite web |title=Capitalization Styles - .NET Framework 1.1| date=17 November 2006 |url=http://msdn.microsoft.com/en-us/library/x2dbyw72(v=vs.71).aspx |access-date=5 December 2012}}</ref><ref>{{cite web |title=Camel Case |url=http://c2.com/cgi/wiki?CamelCase |access-date=10 March 2016}}</ref> For clarity, this article leaves the definition of camel case ambiguous with respect to capitalization, and uses the more specific terms when necessary. Camel case is distinct from several other styles: ''[[title case]]'', which capitalizes all words but retains the spaces between them; ''[[Tall Man lettering]]'', which uses capitals to emphasize the differences between similar-looking product names such as ''[[prednisone|predniSONE]]'' and ''[[prednisolone|predniSOLONE]]''; and ''[[snake case]]'', which uses [[underscore]]s interspersed with lowercase letters (sometimes with the first letter capitalized). A combination of snake and camel case (identifiers ''Written_Like_This'') is recommended in the [[Ada 95]] style guide.<ref>{{cite web |title=Ada 95 Quality and Style Guide |url=https://www.adaic.org/resources/add_content/docs/95style/html/sec_3/3-1-3.html |date=October 1995 |access-date=25 January 2020 |at=Section 3.1.3}}</ref> == Variations and synonyms == The practice has various names, including: {{div col}} * camelBack (or camel-back) notation<ref>[http://www2.tech.purdue.edu/cit/Courses/CPT355/C_Sharp_Coding_Standards_and_Guidelines.asp C# Coding Standards and Guidelines] {{webarchive|url=https://web.archive.org/web/20080411055228/http://www2.tech.purdue.edu/cit/Courses/CPT355/C_Sharp_Coding_Standards_and_Guidelines.asp |date=11 April 2008 }} at [[Purdue University]] College of Technology</ref> or CamelCaps<ref>{{cite web|url=http://everything2.com/title/CamelCase |title=CamelCase@Everything2.com |website=Everything2.com |access-date=4 June 2010}}</ref> * camel case or CamelCase * CapitalizedWords or CapWords for upper camel case in [[Python (programming language)|Python]]<ref name="python">[http://legacy.python.org/dev/peps/pep-0008/ Style Guide for Python Code] at [https://www.python.org www.python.org]</ref> * compoundNames<ref name="compoundNames">{{cite newsgroup | last=Feldman|first=Ian | title = compoundNames | date = 29 March 1990 | newsgroup = alt.folklore.computers |message-id=3230@draken.nada.kth.se | url=https://groups.google.com/group/alt.folklore.computers/browse_thread/thread/6099191f2c4e0984/21f332e5b813313e?#21f332e5b813313e}}</ref> * Embedded caps (or embedded capitals)<ref>{{cite web |url=http://issues.appfuse.org/browse/APF-1088 |title=[#APF-1088] If class name has embedded capitals, AppGen code fails UI tests and generated hyperlinks are incorrect. – AppFuse JIRA |website=Issues.appfuse.org |access-date=4 June 2010 |archive-url=https://web.archive.org/web/20170625073321/http://issues.appfuse.org/browse/APF-1088 |archive-date=25 June 2017 |url-status=dead |df=dmy-all }}</ref> * HumpBack (or hump-back) notation<ref>[http://www.shiningstar.net/articles/articles/standards/namingconventions.asp ASP Naming Conventions] {{Webarchive|url=https://web.archive.org/web/20090408080754/http://www.shiningstar.net/articles/articles/standards/namingconventions.asp |date=8 April 2009 }}, by Nannette Thacker (05/01/1999)</ref> * InterCaps or intercapping<ref>{{Cite book|editor1-last=Iverson|editor1-first=Cheryl|editor2-last=Christiansen|editor2-first=Stacy|editor3-last=Flanagin|editor3-first=Annette|editor4-last=Fontanarosa|editor4-first=Phil B.|editor5-last=Glass|editor5-first=Richard M.|editor6-last=Gregoline|editor6-first=Brenda|editor7-last=Lurie|editor7-first=Stephen J.|editor8-last=Meyer|editor8-first=Harriet S.|editor9-last=Winker|editor9-first=Margaret A.|editor10-last=Young|editor10-first=Rozanne K.|title=AMA Manual of Style|edition=10th|publisher=Oxford University Press|location=Oxford, Oxfordshire|year=2007|isbn=978-0-19-517633-9|url-access=registration|url=https://archive.org/details/amamanualofstyle0000unse}}</ref> (abbreviation of ''Internal Capitalization''<ref>{{cite web |url=http://wps.ablongman.com/long_hult_bnch_4/63/16207/4149058.cw/content/index.html |title=The Brief New Century Handbook – Rules for internal capitalization |publisher=[[Pearson Education]] |first1=Christine A. |last1=Hult |first2=Thomas N. |last2=Huckin |archive-url=https://web.archive.org/web/20120407020530/http://wps.ablongman.com/long_hult_bnch_4/63/16207/4149058.cw/content/index.html |archive-date=7 April 2012 |df=dmy-all }}</ref>) * [[:wikt:medial capital|medial capitals]], recommended by the [[Oxford English Dictionary]]<ref>{{cite web |title=What is the name for a word containing two capital letters (like WordPad)? |url=http://www.askoxford.com/asktheexperts/faq/aboutwords/medial?view=uk |website=AskOxford |publisher=Internet Archive |access-date=12 June 2022 |archive-date=25 October 2008 |archive-url=https://web.archive.org/web/20081025021810/http://www.askoxford.com/asktheexperts/faq/aboutwords/medial?view=uk |url-status=dead }}</ref> * mixedCase for lower camel case in Python<ref name="python" /> * PascalCase for upper camel case<ref>{{cite web |url=https://learn.microsoft.com/en-us/archive/blogs/brada/history-around-pascal-casing-and-camel-casing |title=Brad Abrams: History around Pascal Casing and Camel Casing |website=learn.microsoft.com |date=3 February 2004 |access-date=21 October 2024}}</ref><ref>{{cite web|url=http://c2.com/cgi/wiki?PascalCase |title=Pascal Case |website=C2.com |date=27 September 2012 |access-date=4 January 2014}}</ref><ref>{{cite web|url=http://msdn2.microsoft.com/en-us/library/x2dbyw72(vs.71).aspx |title=NET Framework General Reference Capitalization Styles |website=[[MSDN2]] |date=17 November 2006 |access-date=4 January 2014}}</ref> (after the [[Pascal (programming language)|Pascal programming language]]) * [[Smalltalk]] case * WikiWord<ref name="WikiWord used by [[TWiki]]">{{cite web |url=http://twiki.org/cgi-bin/view/TWiki/WikiWord |title=WikiWord |website=Twiki.org |access-date=4 June 2010 |archive-date=19 June 2010 |archive-url=https://web.archive.org/web/20100619042605/http://twiki.org/cgi-bin/view/TWiki/WikiWord |url-status=dead }}</ref> or WikiCase<ref name="WikiCase mentioned in [[WikiWikiWeb]]">{{cite web|url=http://c2.com/cgi/wiki?WikiCase |title=Wiki Case |website=C2.com |date=8 February 2010 |access-date=4 June 2010}}</ref> (especially in older [[wiki]]s) {{div col end}} == History == The earliest known occurrence of the term "InterCaps" on Usenet is in an April 1990 post to the group <kbd>alt.folklore.computers</kbd> by Avi Rappoport.<ref>{{cite newsgroup | last=Rappoport|first=Avi | title = compoundNames | date = 3 April 1990 | newsgroup = alt.folklore.computers | url=https://groups.google.com/g/alt.folklore.computers/c/YJkZHyxOCYQ/m/PjETuOUy8yEJ}}</ref> The earliest use of the name "Camel Case" occurs in 1995, in a post by Newton Love.<ref>{{cite web|author=Newton Love |url=http://groups.google.com/group/comp.os.os2.advocacy/msg/ab3c8107c6e150fa |title=I'm happy again! – comp.os.os2.advocacy | Google Groups |website=Groups.google.com |date=12 September 1995 |access-date=23 May 2009}}</ref> Love has since said, "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. ... The citation above was just the first time I had used the name on USENET."<ref>{{cite web |url=http://sluug.org/~newt/ |title=Newton Love |website=Saint Louis Unix Users Group }}{{dead link|date=January 2017}}</ref> The term "Pascal Case" was coined in design discussions for the [[.NET Framework]], first released in 2002.<ref>{{cite web |last1=Abrams |first1=Brad |title=History around Pascal Casing and Camel Casing |url=https://learn.microsoft.com/sv-se/archive/blogs/brada/history-around-pascal-casing-and-camel-casing |website=learn.microsoft.com |access-date=1 February 2025 |language=en-us |date=3 February 2004}}</ref> == Traditional use in natural language == ===In word combinations=== The use of medial capitals as a convention in the regular spelling of everyday texts is rare, but is used in some languages as a solution to particular problems which arise when two words or segments are combined. In Italian, pronouns can be suffixed to verbs, and because the honorific form of second-person pronouns is capitalized, this can produce a sentence like ''non ho trovato il tempo di risponderLe'' ("I have not found time to answer you" – where ''Le'' means "to you"). In German, many nouns denoting people lack a gender-neutral form, which is why often, especially colloquially, the male form of a noun is used generically to address everyone, regardless of their gender (this is called ''[[Gender neutrality in languages with gendered third-person pronouns#Generic he|generisches Maskulinum]]'' in German). Another, more recent approach is using the medial capital letter [[I]], called ''[[Binnen-I]]'', in written text for words like ''StudentInnen'' ("students") to indicate that both ''Studenten'' ("male students") and ''Studentinnen'' ("female students") are referred to simultaneously. However, mid-word capitalization does not conform to the [[German orthography]] prescribed by the ''[[Rat für deutsche Rechtschreibung]]'' (Council for German Orthography) apart from proper names like ''McDonald''. In order to adhere to orthography, the introductory “students” example could be corrected using [[parentheses]] to ''Student(inn)en'', which is analogous to writing "congress(wo)men" in English.<ref>{{cite book |author=<!--Staff writer(s); no by-line.--> |title= ''Richtiges und gutes Deutsch: Das Wörterbuch der sprachlichen Zweifelsfälle'' |series=Duden |volume=9 |location=Mannheim |publisher=Bibliographisches Institut |page=418 |date=2011 |edition=7th |isbn=978-3411040971 |language=de}}</ref> In [[Irish orthography|Irish]], camel case is used when an inflectional prefix is attached to a proper noun, for example {{lang|ga|i nGaillimh}} ("in [[Galway]]"), from {{lang|ga|Gaillimh}} ("Galway"); {{lang|ga|an tAlbanach}} ("the Scottish person"), from {{lang|ga|Albanach}} ("Scottish person"); and {{lang|ga|go hÉirinn}} ("to Ireland"), from {{lang|ga|Éire}} ("Ireland"). In recent [[Scottish Gaelic orthography]], a hyphen has been inserted: {{lang|ga|an t-Albannach}}. This convention of inflectional prefix is also used by several written [[Bantu languages]] (e.g. ''isiZulu'', "[[Zulu language]]") and several indigenous [[languages of Mexico]] (e.g. [[Nahuatl languages|Nahuatl]], [[Totonacan languages|Totonacan]], [[Mixe–Zoque languages|Mixe–Zoque]], and some [[Oto-Manguean languages]]). In [[Dutch language|Dutch]], when capitalizing the digraph ''[[IJ (digraph)|ij]]'', both the letter ''I'' and the letter ''J'' are capitalized, for example in the country name ''[[Iceland|IJsland]]'' ("Iceland"). In [[Mandarin Chinese|Chinese]] [[pinyin]], camel case is sometimes used for place names so that readers can more easily pick out the different parts of the name. For example, places like Beijing (北京), Qinhuangdao (秦皇岛), and Daxing'anling (大兴安岭) can be written as ''BeiJing'', ''QinHuangDao,'' and ''DaXingAnLing'' respectively'','' with the number of capital letters equaling the number of [[Chinese characters]]. Writing word compounds only by the initial letter of each character is also acceptable in some cases, so Beijing can be written as ''BJ'', Qinghuangdao as ''QHD,'' and Daxing'anling as DXAL. In English, medial capitals are usually only found in Scottish or Irish "Mac-" or "Mc-" patronymic names, where for example ''MacDonald, McDonald,'' and ''Macdonald'' are common spelling variants of [[MacDonald (surname)|MacDonald]] (son of Dòmhnall), and in Anglo-Norman "Fitz-" names, where for example both ''[[FitzGerald (surname)|FitzGerald]]'' and ''Fitzgerald'' (son of Gerald) are found. In their English style guide ''[[The King's English]]'', first published in 1906, [[Henry Watson Fowler|H. W.]] and [[Francis George Fowler|F. G. Fowler]] suggested that medial capitals could be used in triple [[compound word]]s where [[hyphen]]s would cause ambiguity—the examples they give are ''KingMark-like'' (as against ''King Mark-like'') and ''Anglo-SouthAmerican'' (as against ''Anglo-South American''). However, they described the system as "too hopelessly contrary to use at present".<ref>{{Cite book |last1=Fowler |first1=Henry W. |author-link1=Henry Watson Fowler |last2=Fowler |first2=Francis G. |author-link2=Francis George Fowler |title=The King's English |url=http://www.bartleby.com/116/ |access-date=19 December 2009 |publisher=[[Oxford University Press|Oxford]] |edition=2nd |year=1908 |chapter=Chapter IV. Punctuation – Hyphens |chapter-url=http://www.bartleby.com/116/405.html |archive-url=https://web.archive.org/web/20091231013710/http://bartleby.com/116/ |archive-date=31 December 2009 |url-status=dead }}</ref> Some French names also uses CamelCase names, such as [[LeBeau (surname)]], [[LaRue]], [[DeMordaunt]], and Italian names [[DeRose]]/[[Rosa_(surname)#DeRosa|DeRosa]]. ===In transliterations=== In the scholarly transliteration of languages written in other scripts, medial capitals are used in similar situations. For example, in transliterated [[Hebrew language|Hebrew]], ''haIvri'' means "the Hebrew person" or "the Jew" and ''b'Yerushalayim'' means "in Jerusalem". In [[Standard Tibetan|Tibetan]] proper names like ''rLobsang'', the "r" stands for a prefix glyph in the original script that functions as [[tone (linguistics)|tone]] marker rather than a normal letter. Another example is ''ts<span style="font-family:Times New Roman">I</span>urku'', a Latin transcription of the [[Chechen language|Chechen]] term for the capping stone of the characteristic [[Vainakh medieval towers|Medieval defensive towers]] of [[Chechnya]] and [[Ingushetia]]; the letter "<span style="font-family:Times New Roman">I</span>" ([[palochka]]) is not actually capital, denoting a [[phoneme]] distinct from the one transcribed as "i". === In abbreviations === Medial capitals are traditionally used in abbreviations to reflect the capitalization that the words would have when written out in full, for example in the academic titles PhD or [[Bachelor of Science|BSc]]. A more recent example is [[NaNoWriMo]], a contraction of National Novel Writing Month and the designation for both the annual event and the nonprofit organization that runs it. In German, the names of statutes are abbreviated using embedded capitals, e.g. StGB for {{Lang|de|[[Strafgesetzbuch]]}} (Criminal Code), PatG for {{Lang|de|Patentgesetz}} (Patent Act), BVerfG for {{Lang|de|Bundesverfassungsgericht}} ([[Federal Constitutional Court]]), or the very common GmbH, for {{Lang|de|[[Gesellschaft mit beschränkter Haftung]]}} ([[private limited company]]). In this context, there can even be three or more camel case capitals, e.g. in TzBfG for {{Lang|de|Teilzeit- und Befristungsgesetz}} (Act on Part-Time and Limited Term Occupations). In French, camel case acronyms such as [[Oulipo|OuLiPo]] (1960) were favored for a time as alternatives to initialisms. Camel case is often used to transliterate initialisms into alphabets where two letters may be required to represent a single character of the original alphabet, e.g., [[DShK]] from [[Cyrillic]] ДШК. <!-- Need a real example for the following: In Japan, Camel case is sometimes used when transliterating [[Hiragana]] or [[Katakana]] product names or initialisms into Roman alphabet. --> == History of modern technical use == === Chemical formulas === The first systematic and widespread use of medial capitals for technical purposes was the notation for chemical formulas invented by the Swedish chemist [[Jöns Jakob Berzelius|Jacob Berzelius]] in 1813. To replace the multitude of naming and symbol conventions used by chemists until that time, he proposed to indicate each chemical element by a symbol of one or two letters, the first one being capitalized. The capitalization allowed formulas like "[[sodium chloride|NaCl]]" to be written without spaces and still be parsed without ambiguity.<ref>[[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.</ref><ref>[[Henry M. Leicester]] & Herbert S. Klickstein, eds. 1952, ''A Source Book in Chemistry, 1400-1900'' (Cambridge, MA: Harvard)</ref> Berzelius' system continues to be used, augmented with three-letter symbols such as "[[ununennium|Uue]]" for unconfirmed or unknown elements and abbreviations for some common substituents (especially in the field of organic chemistry, for instance "[[Ethyl group|Et]]" for "ethyl-"). This has been further extended to describe the [[amino acid]] sequences of [[protein]]s and other similar domains. === Early use in trademarks === Since the early 20th century, medial capitals have occasionally been used for [[corporation|corporate]] names and product trademarks, such as * DryIce Corporation (1925) marketed the solid form of [[carbon dioxide]] (CO<sub>2</sub>) as "Dry Ice", thus leading to its common name.<ref name="About Dry ice">{{Cite book| title=The Trade-mark Reporter| publisher=[[International Trademark Association|United States Trademark Association]]| year=1930| issue=v. 20| isbn=1-59888-091-8}}</ref> * [[CinemaScope]] and [[VistaVision]], rival [[widescreen]] movie formats (1953) * [[ShopKo Stores Inc.|ShopKo]] (1962), retail stores, later renamed Shopko * ''MisteRogers Neighborhood'', the TV series also called ''[[Mister Rogers' Neighborhood]]'' (1968)<ref>{{cite web |title=Mister Rogers Neighborhood Season 1 (Episode 4) |url=https://archive.org/details/mister-rogers-neighborhood-season-01/004.mp4 |access-date=21 June 2022}}</ref> * ChemGrass (1965), later renamed [[AstroTurf]] (1967)<!-- Trademark serial number 72286166 --> * [[ConAgra Foods Inc.|ConAgra]] (1971), formerly Consolidated Mills * [[MasterCraft]] (1968), a sports boat manufacturer * [[AeroVironment]] (1971)<!--CHECK - was it the original name?--> * [[PolyGram]] (1972), formerly Grammophon-Philips Group * [[UnitedHealth Group|United HealthCare]] (1977)<ref>{{cite web |url=http://www.unitedhealthgroup.com/about/history.html |title=Our History |website=unitedhealthgroup.com |access-date=15 May 2019 |archive-date=1 May 2019 |url-status=dead |archive-url=https://web.archive.org/web/20190501121118/http://www.unitedhealthgroup.com/about/history.html }}</ref> * [[MasterCard]] (1979), formerly Master Charge * [[SportsCenter]] (1979) === Computer programming === {{Original research|section|date=May 2011}} In the 1970s and 1980s, medial capitals were adopted as a standard or alternative [[naming convention (programming)|naming convention]] for multi-word [[Identifier (computer programming)|identifier]]s in several [[programming language]]s. The precise origin of the convention in computer programming has not yet been settled. A 1954 conference proceedings<ref>{{cite web |url=http://www.bitsavers.org/pdf/mit/summer_session_1954/Digital_Computers_Advanced_Coding_Techniques_Summer_1954.pdf |title="Resume of Session 8". Digital Computers: Advanced Coding Techniques. Summer Session 1954, Massachusetts Institute of Technology |pages=8–6 |date=1954 |access-date=4 January 2014 |archive-url=https://web.archive.org/web/20120229201504/http://bitsavers.org/pdf/mit/summer_session_1954/Digital_Computers_Advanced_Coding_Techniques_Summer_1954.pdf |archive-date=29 February 2012 |url-status=dead }}</ref> occasionally informally referred to [[IBM]]'s [[Speedcoding]] system as "SpeedCo". [[Christopher Strachey]]'s paper on [[General purpose macro processor#Examples of general purpose macro processors|GPM]] (1965),<ref>{{cite journal |last=Strachey |first=Christopher |author-link=Christopher Strachey |title=A General Purpose Macrogenerator |journal=Computer Journal |volume=8 |issue=3 |pages=225–241 |date=October 1965 |doi=10.1093/comjnl/8.3.225|doi-access=free }}</ref> shows a program that includes some medial capital identifiers, including "<code>NextCh</code>" and "<code>WriteSymbol</code>" (This was most likely the influence of the [[CPL_(programming_language)|CPL]] language, of which Strachey was one of the designers) Multiple-word descriptive identifiers with embedded spaces such as <code>end of file</code> or <code>char table</code> cannot be used in most programming languages because the spaces between the words would be [[Parser|parsed]] as [[delimiter]]s between [[Lexical analysis#Token|tokens]]. The alternative of running the words together as in <code>endoffile</code> or <code>chartable</code> is difficult to understand and possibly misleading; for example, <code>chartable</code> is an English word (able to be charted), whereas <code>charTable</code> means a table of <code>chars</code> . Some early programming languages, notably [[Lisp (programming language)|Lisp]] (1958) and [[COBOL]] (1959), addressed this problem by allowing a [[hyphen]] ("-") to be used between words of compound identifiers, as in "END-OF-FILE": Lisp because it worked well with prefix notation (a Lisp parser would not treat a hyphen in the middle of a symbol as a subtraction operator) and COBOL because its operators were individual English words. This convention remains in use in these languages, and is also common in program names entered on a [[command line]], as in Unix. However, this solution was not adequate for mathematically oriented languages such as [[FORTRAN]] (1955) and [[ALGOL 58|ALGOL]] (1958), which used the hyphen as an infix subtraction operator. FORTRAN ignored blanks altogether, so programmers could use embedded spaces in variable names. However, this feature was not very useful since the early versions of the language restricted identifiers to no more than six characters. Exacerbating the problem, common [[punched card]] character sets of the time were uppercase only and lacked other special characters. It was only in the late 1960s that the widespread adoption of the [[ASCII]] character set made both lowercase and the [[underscore]] character <code>_</code> universally available. Some languages, notably [[C (programming language)|C]], promptly adopted underscores as word separators, and identifiers such as <code>end_of_file</code> are still prevalent in C programs and libraries (as well as in later languages influenced by C, such as [[Perl]] and [[Python (programming language)|Python]]). However, some languages and programmers chose to avoid underscores and adopted camel case instead. [[Charles Simonyi]], who worked at [[Xerox PARC]] in the 1970s and later oversaw the creation of Microsoft's Office suite of applications, invented and taught the use of [[Hungarian Notation]], one version of which uses the lowercase letter(s) at the start of a (capitalized) variable name to denote its type. One account{{citation needed|date=January 2017}} claims that the camel case style first became popular at Xerox PARC around 1978, with the [[Mesa (programming language)|Mesa programming language]] developed for the [[Xerox Alto]] computer. This machine lacked an underscore key (whose place was taken by a left arrow "←"), and the hyphen and space characters were not permitted in identifiers, leaving camel case as the only viable scheme for readable multiword names. The PARC Mesa Language Manual (1979) included a coding standard with specific rules for upper and lower camel case that was strictly followed by the Mesa libraries and the Alto operating system. [[Niklaus Wirth]], the inventor of [[Pascal (programming language)|Pascal]], came to appreciate camel case during a sabbatical at PARC and used it in [[Modula]], his next programming language.<ref>{{cite book | doi = 10.1145/1238844.1238847 | chapter-url = http://portal.acm.org/citation.cfm?id=1238847 | author = Niklaus Wirth | title = Proceedings of the third ACM SIGPLAN conference on History of programming languages | chapter = Modula-2 and Oberon | pages = 3-1–3-10 |series = [[History_of_Programming_Languages_(conference)#HOPL_III|HOPL III - San Diego]] | year = 2007 | citeseerx = 10.1.1.91.1447 |isbn = 9781595937667 | s2cid = 1918928 }}</ref> The [[Smalltalk]] language, which was developed originally on the Alto, also uses camel case instead of underscores. This language became quite popular in the early 1980s, and thus may also have been instrumental in spreading the style outside PARC. Upper camel case (or "Pascal case") is used in [[Wolfram Language]] in computer algebraic system [[Mathematica]] for predefined identifiers. User defined identifiers should start with a lower case letter. This avoids the conflict between predefined and user defined identifiers both today and in all future versions. C# variable names are recommended to follow the lower camel case convention.<ref>{{Cite web |last=wwlpublish |title=Declare variables - Training |url=https://learn.microsoft.com/en-us/training/modules/csharp-literals-variables/3-declaring-variables |access-date=2023-08-29 |website=learn.microsoft.com |language=en-us}}</ref> ===Computer companies and products=== Whatever its origins in the computing field, the convention was used in the names of computer companies and their commercial brands, since the late 1970s — a trend that continues to this day: <!-- This is documentation of early commercial usage by IT companies in the 1970s and 1980s, not a complete list. Two or three examples per year is plenty. --> * (1977) [[CompuServe]] * (1978) [[WordStar]] * (1979) [[VisiCalc]] * (1982) [[MicroProse]], [[WordPerfect]] * (1983) [[Novell NetWare|NetWare]] * (1984) [[LaserJet]], [[MacWorks]], [[PostScript]] * (1985) [[Adobe PageMaker|PageMaker]] * (1987) [[ClarisWorks]], [[HyperCard]], [[PowerPoint]] * (1990) [[WorldWideWeb]] (the first web browser), later renamed Nexus === Spread to mainstream usage === In the 1980s and 1990s, after the advent of the personal computer exposed hacker culture to the world, camel case then became fashionable for corporate [[trade name]]s in non-computer fields as well. Mainstream usage was well established by 1990: <!-- This is documentation of increasing commercial usage, not a complete list. Two or three examples per year is plenty. --> * (1980) [[EchoStar Communications Corporation|EchoStar]]<!--CHECK if it was the original spelling--> * (1984) [[BellSouth]] * (1985) ''[[EastEnders]]'' * (1986) ''[[SpaceCamp]]'' * (1990) [[HarperCollins Publishers|HarperCollins]], [[SeaTac, Washington|SeaTac]] * (1998) [[PricewaterhouseCoopers]], merger of Price Waterhouse and Coopers During the [[dot-com bubble]] of the late 1990s, the lowercase prefixes "e" (for "[[electronics|electronic]]") and "i" (for "Internet",<ref>{{Cite news|author=Farhad Manjoo |url=https://www.wired.com/science/discoveries/news/2002/04/52181 |title=Grads Want to Study on EMacs, Too |website=Wired.com |date=30 April 2002|access-date=4 June 2010}}</ref> "information", "[[intelligent]]", etc.) became quite common, giving rise to names like [[Apple Inc.|Apple]]'s [[iMac]] and the [[Zentyal|eBox]] software platform. In 1998, Dave Yost suggested that chemists use medial capitals to aid readability of long chemical names, e.g. write AmidoPhosphoRibosylTransferase instead of [[amidophosphoribosyltransferase]].<ref>[https://www.newscientist.com/article/mg15821399.900-feedback.html ''Feedback, 20 June 1998''] Vol 158 No 2139 [[New Scientist]] 20 June 1998</ref> This usage was not widely adopted. Camel case is sometimes used for abbreviated names of certain neighborhoods, e.g. New York City neighborhoods ''SoHo'' (''So''uth of ''Ho''uston Street) and ''TriBeCa'' (''Tri''angle ''Be''low ''Ca''nal Street) and San Francisco's ''SoMa'' (''So''uth of ''Ma''rket). Such usages erode quickly, so the neighborhoods are now typically rendered as ''Soho'', ''Tribeca'', and ''Soma''. Internal capitalization has also been used for other technical codes like [[HeLa]] (1983). == Current usage in computing == === Programming and coding === {{main article|Naming convention (programming)}} The use of medial caps for compound identifiers is recommended by the [[coding style]] guidelines of many organizations or software projects. For some languages (such as [[Mesa (programming language)|Mesa]], [[Pascal (programming language)|Pascal]], [[Modula]], [[Java (programming language)|Java]] and [[Microsoft]]'s [[.NET]]) this practice is recommended by the language developers or by authoritative manuals and has therefore become part of the language's "culture". Style guidelines often distinguish between upper and lower camel case, typically specifying which variety should be used for specific kinds of entities: [[variable (computer science)|variable]]s, [[field (computer science)|record fields]], [[method (computer science)|method]]s, [[procedure (computer science)|procedures]], [[Function (computer science)|functions]], [[subroutine]]s, [[type (computer science)|types]], etc. These rules are sometimes supported by [[static code analysis|static analysis]] tools that check [[source code]] for adherence. The original [[Hungarian notation]] for programming, for example, specifies that a lowercase abbreviation for the "usage type" (not data type) should prefix all variable names, with the remainder of the name in upper camel case; as such it is a form of lower camel case. Programming identifiers often need to contain [[acronyms and initialisms]] that are already in uppercase, such as "old HTML file". By analogy with the title case rules, the natural camel case rendering would have the abbreviation all in uppercase, namely "oldHTMLFile". However, this approach is problematic when two acronyms occur together (e.g., "parse DBM XML" would become "parseDBMXML") or when the standard mandates lower camel case but the name begins with an abbreviation (e.g. "SQL server" would become "sQLServer"). For this reason, some programmers prefer to treat abbreviations as if they were words and write "oldHtmlFile", "parseDbmXml" or "sqlServer".<ref>{{cite web |title=Google Java Style Guide |url=https://google.github.io/styleguide/javaguide.html#s5.3-camel-case |website=google.github.io |access-date=2 November 2022}}</ref> However, this can make it harder to recognize that a given word is intended as an acronym.<ref>{{cite journal|title=To CamelCase or Under_score|author1=Dave Binkley|author2=Marcia Davis|author3=Dawn Lawrie|author4=Christopher Morrell|citeseerx=10.1.1.158.9499|publisher=IEEE|pages=158–167|journal=IEEE 17th International Conference on Program Comprehension, 2009. ICPC '09.|year=2009|quote=In terms of camel-cased identifiers, this has a greater impact on identifiers that include short words and especially acronyms. For example, consider the acronym ID found in the identifier kIOuterIIDPath. Because of the run of uppercase letters, the task of reading kIOuterIIDPath, in particular the identification of the word ID, is more difficult.}}</ref> Difficulties arise when identifiers have different meaning depending only on the case, as can occur with mathematical functions or trademarks. In this situation changing the case of an identifier might not be an option and an alternative name need be chosen. === Wiki link markup === Camel case is used in some [[wikitext|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]],<ref>Andrew Lih, ''The Wikipedia Revolution: How a Bunch of Nobodies Created the World's Greatest Encyclopedia'' (New York: Hyperion, 2009), pp. 57–58.</ref> and can be activated in most other wikis. Some wiki engines such as [[TiddlyWiki]], [[Trac]] and [[PmWiki]] make use of it in the default settings, but usually also provide a configuration mechanism or [[Plug-in (computing)|plugin]] to disable it. Wikipedia formerly used camel case linking as well, but switched to explicit link markup using [[square brackets]]<ref>Lih, ''The Wikipedia Revolution'', pp. 62–63, 67.</ref> and many other wiki sites have done the same. [[MediaWiki]], for example, [[mw:Manual:MediaWiki feature list#Structures and syntax|does not support]] camel case for linking. Some wikis that do not use camel case linking may still use the camel case as a naming convention, such as [[AboutUs]]. === Other uses === The [[National Information Exchange Model|NIEM]] registry requires that [[XML]] data elements use upper camel case and XML attributes use lower camel case. Most popular [[command-line interface]]s and [[shell script|scripting]] languages cannot easily handle file names that contain embedded spaces (usually requiring the name to be put in quotes). Therefore, users of those systems often resort to camel case (or underscores, hyphens and other "safe" characters) for compound file names like <span style="font-family: monospace, monospace;">MyJobResume.pdf</span>. ==== Social media accessibility ==== [[Microblogging]] and [[social networking service]]s that limit the number of characters in a message are potential outlets for medial capitals. Using camel case between words reduces the number of spaces, and thus the number of characters, in a given message, allowing more content to fit into the limited space. [[Hashtag]]s, especially long ones, often use camel case to maintain readability (e.g. #CollegeStudentProblems is easier to read than #collegestudentproblems);<ref>{{cite web |last1=Blackwood |first1=Jessica |last2=Brown |first2=Kate |title=Accessible Use of CamelCase and Structuring Posts |url=https://ecampusontario.pressbooks.pub/accessibledigitalcontenttraining/chapter/accessible-use-of-camelcase-and-structuring-posts/ |website=Accessible Digital Content Training |publisher=McMaster University}}</ref> this practice improves [[accessibility]] as [[screen reader]]s recognize CamelCase in parsing composite hashtags.<ref>{{cite web |year=2022 |title=Social Media Accessibility Guidelines |url=https://accessibility.princeton.edu/guidelines/social-media#camelcase |url-status=dead |archive-url=https://web.archive.org/web/20221012082805/https://accessibility.princeton.edu/guidelines/social-media#camelcase |archive-date=12 October 2022 |access-date=12 October 2022 |publisher=Princeton University}}</ref> In website URLs, spaces are [[Percent-encoding|percent-encoded]] as "%20", making the address longer and less [[human readable]]. By omitting spaces, camel case does not have this problem. == Readability studies == Camel case has been criticized as negatively impacting readability due to the removal of spaces and uppercasing of every word.<ref>{{cite news|url=https://www.nytimes.com/2009/11/29/magazine/29FOB-onlanguage-t.html?_r=2&ref=magazine&|newspaper=New York Times|title=Against Camel Case|author=Caleb Crain|date=23 November 2009}}</ref> A 2009 study of 135 subjects comparing [[snake case]] (underscored identifiers) to camel case found that camel case identifiers were recognized with higher accuracy among all subjects. Subjects recognized snake case identifiers more quickly than camel case identifiers. Training in camel case sped up camel case recognition and slowed snake case recognition, although this effect involved coefficients with high [[p-value]]s. The study also conducted a subjective survey and found that non-programmers either preferred underscores or had no preference, and 38% of programmers trained in camel case stated a preference for underscores. However, these preferences had no statistical correlation to accuracy or speed when controlling for other variables.<ref>{{cite journal|title=To CamelCase or Under_score|author1=Dave Binkley|author2=Marcia Davis|author3=Dawn Lawrie|author4=Christopher Morrell|citeseerx=10.1.1.158.9499|publisher=IEEE|pages=158–167|journal=IEEE 17th International Conference on Program Comprehension, 2009. ICPC '09.|year=2009|quote=The experiment builds on past work of others who study how readers of natural language perform such tasks. Results indicate that camel casing leads to higher accuracy among all subjects regardless of training, and those trained in camel casing are able to recognize identifiers in the camel case style faster than identifiers in the underscore style.}}</ref> A 2010 follow-up study used a similar study design with 15 subjects consisting of expert programmers trained primarily in snake case. It used a static rather than animated stimulus and found perfect accuracy in both styles except for one incorrect camel case response. Subjects recognized identifiers in snake case more quickly than camel case. The study used eye-tracking equipment and found that the difference in speed for its subjects was primarily due to the fact that average duration of [[Fixation (visual)|fixations]] for camel-case was significantly higher than that of snake case for 3-part identifiers. The survey recorded a mixture of preferred identifier styles but again there was no correlation of preferred style to accuracy or speed.<ref>{{cite book |id=([http://www.cs.kent.edu/~jmaletic/papers/ICPC2010-CamelCaseUnderScoreClouds.pdf download PDF]) |author1=Bonita Sharif|author2=Jonathan I. Maletic |title=2010 IEEE 18th International Conference on Program Comprehension |chapter=An Eye Tracking Study on camelCase and under_score Identifier Styles |publisher=IEEE |pages=196–205 |year=2010 |quote=An empirical study to determine if identifier-naming conventions (i.e., camelCase and under_score) affect code comprehension is presented. An eye tracker is used to capture quantitative data from human subjects during an experiment. The intent of this study is to replicate a previous study published at ICPC 2009 (Binkley et al.) that used a timed response test method to acquire data. The use of eye-tracking equipment gives additional insight and overcomes some limitations of traditional data gathering techniques. Similarities and differences between the two studies are discussed. One main difference is that subjects were trained mainly in the underscore style and were all programmers. While results indicate no difference in accuracy between the two styles, subjects recognize identifiers in the underscore style more quickly.|doi=10.1109/ICPC.2010.41 |citeseerx=10.1.1.421.6137 |isbn=978-1-4244-7604-6 |s2cid=14170019 }}</ref> == See also == {{columns-list|colwidth=15em| * [[All caps]] * [[Alternating caps]] * [[Capitalization]] * [[Caps lock]] * [[Kebab case]] * [[Naming convention (programming)]] * [[Sentence case]] * [[Shift key]] * [[Small caps]] * [[Snake case]] * [[Title case]] * [[Unicase]] }} == References == {{Reflist|30em}} == External links == {{commons category|Camel case}} {{wiktionary}} * [https://camel-case.com Camel Case Guide & Converter], further reading on usage with examples * [http://c2.com/cgi/wiki?CamelCase Examples and history of CamelCase], also [http://c2.com/cgi/wiki?WordsSmashedTogetherLikeSo WordsSmashedTogetherLikeSo] * [http://msdn2.microsoft.com/en-us/library/x2dbyw72(vs.71).aspx .NET Framework General Reference Capitalization Styles] * [http://www.theslot.com/webnames.html What's in a nAME(cq)?], by Bill Walsh, at The Slot * [http://www.microsoft.com/typography/ctfonts/WordRecognition.aspx The Science of Word Recognition], by Kevin Larson, Advanced Reading Technology, Microsoft Corporation * [http://capitalizemytitle.com/camel-case/ Convert text to CamelCase] * [http://xml.coverpages.org/camelCase.html OASIS Cover Pages: CamelCase for Naming XML-Related Components]{{Dead link|date=May 2025 |bot=InternetArchiveBot |fix-attempted=yes }} * [https://titlecapitalize.com/text-to-camelcase/ Convert text to CamelCase, Title Case, Uppercase and lowercase] * [https://medium.com/@shahnazi2002/demystifying-common-casings-in-programming-what-they-are-and-when-to-use-them-efbd8c1ec2a0 Demystifying Common Casings in Programming: What They Are and When to Use Them] {{Typography terms}} [[Category:Capitalization]] [[Category:Naming conventions]] [[Category:Typography]] [[Category:Source code]] [[Category:Metaphors referring to camels]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Ambox
(
edit
)
Template:Citation needed
(
edit
)
Template:Cite book
(
edit
)
Template:Cite journal
(
edit
)
Template:Cite news
(
edit
)
Template:Cite newsgroup
(
edit
)
Template:Cite web
(
edit
)
Template:Columns-list
(
edit
)
Template:Commons category
(
edit
)
Template:Dead link
(
edit
)
Template:Div col
(
edit
)
Template:Div col end
(
edit
)
Template:Lang
(
edit
)
Template:Main article
(
edit
)
Template:Original research
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Sister project
(
edit
)
Template:Typography terms
(
edit
)
Template:Use American English
(
edit
)
Template:Use dmy dates
(
edit
)
Template:Webarchive
(
edit
)
Template:Wiktionary
(
edit
)