Medial Capital
   HOME

TheInfoList



OR:

Camel case (sometimes stylized 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. The format indicates the separation of words with a single capitalized letter, and the first word starting with either case. Common examples include " iPhone" and "
eBay eBay Inc. ( ) is an American multinational e-commerce company based in San Jose, California, that facilitates consumer-to-consumer and business-to-consumer sales through its website. eBay was founded by Pierre Omidyar in 1995 and became ...
". It is also sometimes used in online usernames such as "johnSmith", and to make multi-word
domain names A domain name is a string that identifies a realm of administrative autonomy, authority or control within the Internet. Domain names are often used to identify services provided through the Internet, such as websites, email services and more. As ...
more legible, for example in promoting "EasyWidgetCompany.com". Camel case is often used as a
naming convention A naming convention is a convention (generally agreed scheme) for naming things. Conventions differ in their intents, which may include to: * Allow useful information to be deduced from the names based on regularities. For instance, in Manhatta ...
in computer programming, but is an ambiguous definition due to the optional
capitalization Capitalization (American English) or capitalisation (British English) is writing a word with its first letter as a capital letter (uppercase letter) and the remaining letters in lower case, in writing systems with a case distinction. The term ...
of the first letter. Some programming styles prefer camel case with the first letter capitalised, others not. For clarity, this article calls the two alternatives upper camel case (initial uppercase letter, also known as Pascal case or bumpy case) and lower camel case (initial lowercase letter, also known as
dromedary The dromedary (''Camelus dromedarius'' or ;), also known as the dromedary camel, Arabian camel, or one-humped camel, is a large even-toed ungulate, of the genus ''Camelus'', with one hump on its back. It is the tallest of the three species of ...
case). Some people and organizations, notably
Microsoft Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washin ...
, use the term ''camel case'' only for lower camel case, designating Pascal case for the upper camel case. Camel case is distinct from
title case Title case or headline case is a style of capitalization used for rendering the titles of published works or works of art in English. When using title case, all words are capitalized, except for minor words (typically articles, short prepositions, ...
, which capitalises all words but retains the spaces between them, and from Tall Man lettering, which uses capitals to emphasize the differences between similar-looking product names such as "predniSONE" and "predniSOLONE". Camel case is also distinct from
snake case Snake case (stylized as snake_case) refers to the style of writing in which each space is replaced with an underscore (_) character, and the first letter of each word is written in lowercase. It is a commonly used naming convention in computing, ...
, which uses underscores 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.


Variations and synonyms

The practice has various names, including: * camelBack (or camel-back) notation or CamelCaps * camel case or CamelCase * CapitalizedWords or CapWords for upper camel case in
Python Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (pro ...
Style Guide for Python Code
a
www.python.org
/ref> * compoundNames * Embedded caps (or embedded capitals) * HumpBack (or hump-back) notation * InterCaps or intercapping (abbreviation of ''Internal Capitalization'') *
medial capitals Camel case (sometimes stylized 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. The format indicates the separation of words with a single ...
, recommended by the
Oxford English Dictionary The ''Oxford English Dictionary'' (''OED'') is the first and foundational historical dictionary of the English language, published by Oxford University Press (OUP). It traces the historical development of the English language, providing a co ...
* mixedCase for lower camel case in Python * PascalCase for upper camel case (after the
Pascal programming language Pascal is an imperative and procedural programming language, designed by Niklaus Wirth as a small, efficient language intended to encourage good programming practices using structured programming and data structuring. It is named in honour o ...
) * Smalltalk case * WikiWordTWiki TWiki is a Perl-based structured wiki application, typically used to run a collaboration platform, knowledge or document management system, a knowledge base, or team portal. Users can create wiki pages using the TWiki Markup Language, and dev ...
"> or WikiCaseWikiWikiWeb The WikiWikiWeb is the first wiki, or user-editable website. It was launched on 25 March 1995 by programmer Ward Cunningham to accompany the Portland Pattern Repository website discussing software design patterns. The name ''WikiWikiWeb'' ori ...
">
(especially in older
wiki A wiki ( ) is an online hypertext publication collaboratively edited and managed by its own audience, using a web browser. A typical wiki contains multiple pages for the subjects or scope of the project, and could be either open to the pub ...
s) 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. The earliest use of the name "Camel Case" occurs in 1995, in a post by Newton Love. 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."


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 German(s) may refer to: * Germany (of or related to) ** Germania (historical use) * Germans, citizens of Germany, people of German ancestry, or native speakers of the German language ** For citizens of Germany, see also German nationality law **Ge ...
, the medial capital letter I, called ''
Binnen-I In German, a medial capital I ( German: ') is a non-standard, mixed case typographic convention used to indicate gender inclusivity for nouns having to do with people, by using a capital letter 'I' inside the word (''Binnenmajuskel'', liter ...
'', is sometimes used in a word like ''StudentInnen'' ("students") to indicate that both ''Studenten'' ("male students") and ''Studentinnen'' ("female students") are intended simultaneously. However, mid-word capitalisation does not conform to
German orthography German orthography is the orthography used in writing the German language, which is largely phonemic. However, it shows many instances of spellings that are historic or analogous to other spellings rather than phonemic. The pronunciation of al ...
apart from proper names like ''McDonald''; the previous example could be correctly written using
parentheses A bracket is either of two tall fore- or back-facing punctuation marks commonly used to isolate a segment of text or data from its surroundings. Typically deployed in symmetric pairs, an individual bracket may be identified as a 'left' or 'r ...
as ''Student(inn)en'', analogous to "congress(wo)men" in English. In
Irish Irish may refer to: Common meanings * Someone or something of, from, or related to: ** Ireland, an island situated off the north-western coast of continental Europe ***Éire, Irish language name for the isle ** Northern Ireland, a constituent unit ...
, camel case is used when an inflectional prefix is attached to a proper noun, for example ("in
Galway Galway ( ; ga, Gaillimh, ) is a city in the West of Ireland, in the province of Connacht, which is the county town of County Galway. It lies on the River Corrib between Lough Corrib and Galway Bay, and is the sixth most populous city on ...
"), from ("Galway"); ("the Scottish person"), from ("Scottish person"); and ("to
Ireland Ireland ( ; ga, Éire ; Ulster Scots dialect, Ulster-Scots: ) is an island in the Atlantic Ocean, North Atlantic Ocean, in Northwestern Europe, north-western Europe. It is separated from Great Britain to its east by the North Channel (Grea ...
"), from ("Ireland"). In recent
Scottish Gaelic orthography Scottish Gaelic orthography has evolved over many centuries and is heavily etymologizing in its modern form. This means the orthography tends to preserve historical components rather than operating on the principles of a phonemic orthography wher ...
, a hyphen has been inserted: . This convention is also used by several written Bantu languages (e.g. ''isiZulu'', "
Zulu language Zulu (), or isiZulu as an endonym, is a Southern Bantu language of the Nguni branch spoken in Southern Africa. It is the language of the Zulu people, with about 12 million native speakers, who primarily inhabit the province of KwaZulu-Natal ...
") and several indigenous languages of Mexico (e.g. Nahuatl, Totonacan, Mixe–Zoque, and some
Oto-Manguean languages The Oto-Manguean or Otomanguean languages are a large family comprising several subfamilies of indigenous languages of the Americas. All of the Oto-Manguean languages that are now spoken are indigenous to Mexico, but the Manguean branch of the ...
). In
Dutch Dutch commonly refers to: * Something of, from, or related to the Netherlands * Dutch people () * Dutch language () Dutch may also refer to: Places * Dutch, West Virginia, a community in the United States * Pennsylvania Dutch Country People E ...
, when capitalizing the digraph '' ij'', both the letter ''I'' and the letter ''J'' are capitalized, for example in the country name '' IJsland'' ("Iceland"). In
Chinese Chinese can refer to: * Something related to China * Chinese people, people of Chinese nationality, citizenship, and/or ethnicity **''Zhonghua minzu'', the supra-ethnic concept of the Chinese nation ** List of ethnic groups in China, people of ...
pinyin Hanyu Pinyin (), often shortened to just pinyin, is the official romanization system for Standard Chinese, Standard Mandarin Chinese in China, and to some extent, in Singapore and Malaysia. It is often used to teach Mandarin, normally writte ...
, 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 Chinese characters () are logograms developed for the writing of Chinese. In addition, they have been adapted to write other East Asian languages, and remain a key component of the Japanese writing system where they are known as ''kanji ...
. 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-" names, where for example ''MacDonald, McDonald,'' and ''Macdonald'' are common spelling variants of the same name, and in Anglo-Norman "Fitz-" names, where for example both ''FitzGerald'' and ''Fitzgerald'' are found. In their English style guide ''
The King's English ''The King's English'' is a book on English usage and grammar. It was written by the brothers Henry Watson Fowler and Francis George Fowler and published in 1906; it thus predates by twenty years '' Modern English Usage'', which was written by ...
'', first published in 1906, H. W. and F. G. Fowler suggested that medial capitals could be used in triple
compound word In linguistics, a compound is a lexeme (less precisely, a word or sign) that consists of more than one stem. Compounding, composition or nominal composition is the process of word formation that creates compound lexemes. Compounding occurs when ...
s where
hyphen The hyphen is a punctuation mark used to join words and to separate syllables of a single word. The use of hyphens is called hyphenation. ''Son-in-law'' is an example of a hyphenated word. The hyphen is sometimes confused with dashes ( figure ...
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".


In transliterations

In the scholarly transliteration of languages written in other scripts, medial capitals are used in similar situations. For example, in transliterated
Hebrew Hebrew (; ; ) is a Northwest Semitic language of the Afroasiatic language family. Historically, it is one of the spoken languages of the Israelites and their longest-surviving descendants, the Jews and Samaritans. It was largely preserved ...
, ''ha'Ivri'' means "the Hebrew person" or "the Jew" and ''b'Yerushalayim'' means "in Jerusalem". In
Tibetan Tibetan may mean: * of, from, or related to Tibet * Tibetan people, an ethnic group * Tibetan language: ** Classical Tibetan, the classical language used also as a contemporary written standard ** Standard Tibetan, the most widely used spoken dial ...
proper names like ''rLobsang'', the "r" 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 Chechnya and Ingushetia; the letter "I" (
palochka The palochka or palotchka () ( rus, палочка, p=ˈpaɫətɕkə, r=palochka, literally "a stick") is a letter in the Cyrillic script. The letter usually has only a capital form, which is also used in lowercase text. The capital form of the ...
) is not actually capital, denoting a
phoneme In phonology and linguistics, a phoneme () is a unit of sound that can distinguish one word from another in a particular language. For example, in most dialects of English, with the notable exception of the West Midlands and the north-wes ...
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
BSc A Bachelor of Science (BS, BSc, SB, or ScB; from the Latin ') is a bachelor's degree awarded for programs that generally last three to five years. The first university to admit a student to the degree of Bachelor of Science was the University ...
. 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 Strafgesetzbuch (Criminal Code), PatG for Patentgesetz (Patent Act), BVerfG for Bundesverfassungsgericht (
Federal Constitutional Court The Federal Constitutional Court (german: link=no, Bundesverfassungsgericht ; abbreviated: ) is the supreme constitutional court for the Federal Republic of Germany, established by the constitution or Basic Law () of Germany. Since its in ...
), or the very common GmbH, for
Gesellschaft mit beschränkter Haftung A ''Gesellschaft mit beschränkter Haftung'' (, abbreviated GmbH and also GesmbH in Austria; ) is a type of Juristic person, legal entity common in Germany, Austria, Switzerland (where it is equivalent to a ''société à responsabilité limit ...
(
private limited company A private limited company is any type of business entity in "private" ownership used in many jurisdictions, in contrast to a publicly listed company, with some differences from country to country. Examples include the '' LLC'' in the United St ...
). In this context, there can even be three or more camel case capitals, e.g. in TzBfG for Teilzeit- und Befristungsgesetz (Act on Part-Time and Limited Term Occupations). In French, camel case acronyms such as
OuLiPo Oulipo (, short for french: Ouvroir de littérature potentielle; roughly translated: ''"workshop of potential literature"'', stylized ''OuLiPo'') is a loose gathering of (mainly) French-speaking writers and mathematicians who seek to create works ...
(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 The DShK 1938 ( Cyrillic: ДШК, for russian: Дегтярёва-Шпагина Крупнокалиберный, Degtyaryova-Shpagina Krupnokaliberny, links=no, "Degtyaryov-Shpagin large-calibre") is a Soviet heavy machine gun with a V-shaped bu ...
from Cyrillic ДШК.


History of modern technical use


Chemical formulae

The first systematic and widespread use of medial capitals for technical purposes was the notation for chemical formulae invented by the Swedish chemist
Jacob Berzelius Jacob (; ; ar, يَعْقُوب, Yaʿqūb; gr, Ἰακώβ, Iakṓb), later given the name Israel, is regarded as a patriarch of the Israelites and is an important figure in Abrahamic religions, such as Judaism, Christianity, and Islam. Jac ...
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 formulae like "
NaCl Sodium chloride , commonly known as salt (although sea salt also contains other chemical salts), is an ionic compound with the chemical formula NaCl, representing a 1:1 ratio of sodium and chloride ions. With molar masses of 22.99 and 35.45 g/ ...
" to be written without spaces and still be parsed without ambiguity. Berzelius' system continues to be used, augmented with three-letter symbols such as " Uue" for unconfirmed or unknown elements and abbreviations for some common substituents (especially in the field of organic chemistry, for instance " Et" for "ethyl-"). This has been further extended to describe the
amino acid Amino acids are organic compounds that contain both amino and carboxylic acid functional groups. Although hundreds of amino acids exist in nature, by far the most important are the alpha-amino acids, which comprise proteins. Only 22 alpha a ...
sequences of
protein Proteins are large biomolecules and macromolecules that comprise one or more long chains of amino acid residues. Proteins perform a vast array of functions within organisms, including catalysing metabolic reactions, DNA replication, res ...
s and other similar domains.


Early use in trademarks

Since the early 20th century, medial capitals have occasionally been used for
corporate A corporation is an organization—usually a group of people or a company—authorized by the state to act as a single entity (a legal entity recognized by private and public law "born out of statute"; a legal person in legal context) and r ...
names and product
trademark A trademark (also written trade mark or trade-mark) is a type of intellectual property consisting of a recognizable sign, design, or expression that identifies products or services from a particular source and distinguishes them from othe ...
s, such as * DryIce Corporation (1925) marketed the solid form of
carbon dioxide Carbon dioxide ( chemical formula ) is a chemical compound made up of molecules that each have one carbon atom covalently double bonded to two oxygen atoms. It is found in the gas state at room temperature. In the air, carbon dioxide is trans ...
(CO2) as "Dry Ice", thus leading to its common name. * CinemaScope and
VistaVision VistaVision is a higher resolution, widescreen variant of the 35 mm motion picture film format which was created by engineers at Paramount Pictures in 1954. Paramount never used anamorphic processes such as 2.55: 1, CinemaScope but refi ...
, rival
widescreen Widescreen images are displayed within a set of aspect ratios (relationship of image width to height) used in film, television and computer screens. In film, a widescreen film is any film image with a width-to-height aspect ratio greater than t ...
movie A film also called a movie, motion picture, moving picture, picture, photoplay or (slang) flick is a work of visual art that simulates experiences and otherwise communicates ideas, stories, perceptions, feelings, beauty, or atmosphere ...
formats (1953) * ShopKo (1962), retail stores, later renamed Shopko * ''MisteRogers Neighborhood'', the TV series also called ''
Mister Rogers' Neighborhood ''Mister Rogers' Neighborhood'' (sometimes shortened to ''Mister Rogers'') is an American half-hour educational children's television series that ran from 1968 to 2001, and was created and hosted by Fred Rogers. The series ''Misterogers'' deb ...
'' (1968) * ChemGrass (1965), later renamed AstroTurf (1967) *
ConAgra Conagra Brands, Inc. (formerly ConAgra Foods) is an American consumer packaged goods holding company headquartered in Chicago, Illinois. Conagra makes and sells products under various brand names that are available in supermarkets, restaurants, ...
(1971), formerly Consolidated Mills *
MasterCraft The MasterCraft Boat Company is an American manufacturer of luxury high-performance boats. The company was founded in 1968 in Maryville, Tennessee, and is currently headquartered in Vonore, Tennessee. MasterCraft boats are used in waterskiing, ...
(1968), a sports boat manufacturer * AeroVironment (1971) * PolyGram (1972), formerly Grammophon-Philips Group *
United HealthCare UnitedHealth Group Incorporated is an American multinational managed healthcare and insurance company based in Minnetonka, Minnesota. It offers health care products and insurance services. UnitedHealth Group is the world's seventh largest c ...
(1977) * MasterCard (1979), formerly Master Charge * SportsCenter (1979)


Computer programming

In the 1970s and 1980s, medial capitals were adopted as a standard or alternative
naming convention A naming convention is a convention (generally agreed scheme) for naming things. Conventions differ in their intents, which may include to: * Allow useful information to be deduced from the names based on regularities. For instance, in Manhatta ...
for multi-word identifiers in several
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
s. The precise origin of the convention in computer programming has not yet been settled. A 1954 conference proceedings occasionally informally referred to IBM's
Speedcoding Speedcoding, Speedcode or SpeedCo was the first high-level programming language created for an IBM computer. The language was developed by John W. Backus in 1953 for the IBM 701 to support computation with floating point numbers. The idea ...
system as "SpeedCo".
Christopher Strachey Christopher S. Strachey (; 16 November 1916 – 18 May 1975) was a British computer scientist. He was one of the founders of denotational semantics, and a pioneer in programming language design and computer time-sharing.F. J. Corbató, et al. ...
's paper on GPM (1965), shows a program that includes some medial capital identifiers, including "NextCh" and "WriteSymbol". Multiple-word descriptive identifiers with embedded spaces such as end of file or char table cannot be used in most programming languages because the spaces between the words would be
parsed Parsing, syntax analysis, or syntactic analysis is the process of analyzing a String (computer science), string of Symbol (formal), symbols, either in natural language, computer languages or data structures, conforming to the rules of a formal gra ...
as delimiters between tokens. The alternative of running the words together as in endoffile or chartable is difficult to understand and possibly misleading; for example, chartable is an English word (able to be charted), whereas charTable means a table of chars . Some early programming languages, notably Lisp (1958) and COBOL (1959), addressed this problem by allowing a
hyphen The hyphen is a punctuation mark used to join words and to separate syllables of a single word. The use of hyphens is called hyphenation. ''Son-in-law'' is an example of a hyphenated word. The hyphen is sometimes confused with dashes ( figure ...
("-") 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 A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invoking executables and pro ...
, as in Unix. However, this solution was not adequate for mathematically-oriented languages such as FORTRAN (1955) and
ALGOL ALGOL (; short for "Algorithmic Language") is a family of imperative computer programming languages originally developed in 1958. ALGOL heavily influenced many other languages and was the standard method for algorithm description used by the ...
(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 A punched card (also punch card or punched-card) is a piece of stiff paper that holds digital data represented by the presence or absence of holes in predefined positions. Punched cards were once common in data processing applications or to di ...
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 ASCII ( ), abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Because ...
character set made both lowercase and the
underscore An underscore, ; also called an underline, low line, or low dash; is a line drawn under a segment of text. In proofreading, underscoring is a convention that says "set this text in italic type", traditionally used on manuscript or typescript a ...
character _ universally available. Some languages, notably C, promptly adopted underscores as word separators, and identifiers such as end_of_file are still prevalent in C programs and libraries (as well as in later languages influenced by C, such as
Perl Perl is a family of two high-level, general-purpose, interpreted, dynamic programming languages. "Perl" refers to Perl 5, but from 2000 to 2019 it also referred to its redesigned "sister language", Perl 6, before the latter's name was offic ...
and
Python Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (pro ...
). However, some languages and programmers chose to avoid underscores—among other reasons to prevent confusing them with whitespace—and adopted camel case instead.
Charles Simonyi Charles Simonyi (; hu, Simonyi Károly, ; born September 10, 1948) is a Hungarian-American software architect. He started and led Microsoft's applications group, where he built the first versions of Microsoft Office. He co-founded and led Int ...
, who worked at
Xerox PARC PARC (Palo Alto Research Center; formerly Xerox PARC) is a research and development company in Palo Alto, California. Founded in 1969 by Jacob E. "Jack" Goldman, chief scientist of Xerox Corporation, the company was originally a division of Xero ...
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 claims that the camel case style first became popular at Xerox PARC around 1978, with the
Mesa programming language Mesa is a programming language developed in the late 1970s at the Xerox Palo Alto Research Center in Palo Alto, California, United States. The language name was a pun based upon the programming language catchphrases of the time, because Mesa is a ...
developed for the
Xerox Alto The Xerox Alto is a computer designed from its inception to support an operating system based on a graphical user interface (GUI), later using the desktop metaphor. The first machines were introduced on 1 March 1973, a decade before mass-market ...
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 Niklaus Emil Wirth (born 15 February 1934) is a Swiss computer scientist. He has designed several programming languages, including Pascal, and pioneered several classic topics in software engineering. In 1984, he won the Turing Award, generally ...
, the inventor of Pascal, came to appreciate camel case during a sabbatical at PARC and used it in
Modula The Modula programming language is a descendant of the Pascal language. It was developed in Switzerland, at ETH Zurich, in the mid-1970s by Niklaus Wirth, the same person who designed Pascal. The main innovation of Modula over Pascal is a modul ...
, his next programming language. 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 The Wolfram Language ( ) is a general multi-paradigm programming language developed by Wolfram Research. It emphasizes symbolic computation, functional programming, and rule-based programming and can employ arbitrary structures and data. It ...
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.


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: * (1977) CompuServe * (1978)
WordStar WordStar is a word processor application for microcomputers. It was published by MicroPro International and originally written for the CP/M-80 operating system, and later written also for MS-DOS and other 16-bit PC OSes. Rob Barnaby was the so ...
* (1979)
VisiCalc VisiCalc (for "visible calculator") is the first spreadsheet computer program for personal computers, originally released for Apple II by VisiCorp on 17 October 1979. It is often considered the application that turned the microcomputer from a hob ...
* (1982) MicroProse, WordPerfect * (1983) NetWare * (1984)
LaserJet LaserJet as a brand name identifies the line of laser printers marketed by the American computer company Hewlett-Packard (HP). The HP LaserJet was the first popular desktop laser printer. Canon supplies both mechanisms and cartridges for most HP ...
,
MacWorks MacWorks XL was an Apple Lisa computer program which shipped with the Macintosh XL. It allowed 64K Apple Macintosh ROM emulation so the Macintosh XL could run classic Mac OS programs. History Soon after the debut of the Macintosh, which sold ove ...
, PostScript * (1985)
PageMaker Adobe PageMaker (formerly Aldus) is a discontinued desktop publishing computer program introduced in 1985 by the Aldus Corporation on the Apple Macintosh. The combination of the Macintosh's graphical user interface, PageMaker publishing software, ...
* (1987)
ClarisWorks AppleWorks was an integrated office suite containing a word processor, database, and spreadsheet. It was developed by Rupert Lissner for Apple Computer, originally for the Apple II platform and launched in 1984, and was later reworked for the ...
,
HyperCard HyperCard is a software application and development kit for Apple Macintosh and Apple IIGS computers. It is among the first successful hypermedia systems predating the World Wide Web. HyperCard combines a flat-file database with a graphical, f ...
,
PowerPoint Microsoft PowerPoint is a presentation program, created by Robert Gaskins and Dennis Austin at a software company named Forethought, Inc. It was released on April 20, 1987, initially for Macintosh computers only. Microsoft acquired PowerPo ...
* (1990)
WorldWideWeb WorldWideWeb (later renamed Nexus to avoid confusion between the software and the World Wide Web) is the first web browser and web page editor. It was discontinued in 1994. It was the first WYSIWYG HTML editor. The source code was released in ...
(the first web browser), later renamed Nexus


Spread to mainstream usage

In the 1980s and 1990s, after the advent of the
personal computer A personal computer (PC) is a multi-purpose microcomputer whose size, capabilities, and price make it feasible for individual use. Personal computers are intended to be operated directly by an end user, rather than by a computer expert or tec ...
exposed hacker culture to the world, camel case then became fashionable for corporate
trade name A trade name, trading name, or business name, is a pseudonym used by companies that do not operate under their registered company name. The term for this type of alternative name is a "fictitious" business name. Registering the fictitious name w ...
s in non-computer fields as well. Mainstream usage was well established by 1990: * (1980) EchoStar * (1984)
BellSouth BellSouth, LLC (stylized as ''BELLSOUTH'' and formerly known as BellSouth Corporation) was an American telecommunications holding company based in Atlanta, Georgia. BellSouth was one of the seven original Regional Bell Operating Companies after ...
* (1985) '' EastEnders'' * (1986) ''
SpaceCamp ''SpaceCamp'' is a 1986 American science fiction adventure film inspired by the U.S. Space Camp in Huntsville, Alabama. Directed by Harry Winer, story by Patrick Bailey and Larry B. Williams, screenplay by Clifford Green (as W. W. Wicket) and Ca ...
'' * (1990)
HarperCollins HarperCollins Publishers LLC is one of the Big Five English-language publishing companies, alongside Penguin Random House, Simon & Schuster, Hachette, and Macmillan. The company is headquartered in New York City and is a subsidiary of News ...
, SeaTac * (1998)
PricewaterhouseCoopers PricewaterhouseCoopers is an international professional services brand of firms, operating as partnerships under the PwC brand. It is the second-largest professional services network in the world and is considered one of the Big Four accounti ...
, merger of Price Waterhouse and Coopers During the
dot-com bubble The dot-com bubble (dot-com boom, tech bubble, or the Internet bubble) was a stock market bubble in the late 1990s, a period of massive growth in the use and adoption of the Internet. Between 1995 and its peak in March 2000, the Nasdaq Compo ...
of the late 1990s, the lowercase prefixes "e" (for "
electronic Electronic may refer to: *Electronics, the science of how to control electric energy in semiconductor * ''Electronics'' (magazine), a defunct American trade journal *Electronic storage, the storage of data using an electronic device *Electronic co ...
") and "i" (for "
Internet The Internet (or internet) is the global system of interconnected computer networks that uses the Internet protocol suite (TCP/IP) to communicate between networks and devices. It is a '' network of networks'' that consists of private, pub ...
", "
information Information is an abstract concept that refers to that which has the power to inform. At the most fundamental level information pertains to the interpretation of that which may be sensed. Any natural process that is not completely random ...
", " intelligent", etc.) became quite common, giving rise to names like
Apple An apple is an edible fruit produced by an apple tree (''Malus domestica''). Apple trees are cultivated worldwide and are the most widely grown species in the genus ''Malus''. The tree originated in Central Asia, where its wild ancestor, ' ...
's
iMac iMac is a family of all-in-one Mac desktop computers designed and built by Apple Inc. It has been the primary part of Apple's consumer desktop offerings since its debut in August 1998, and has evolved through seven distinct forms. In it ...
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. 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

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,
Modula The Modula programming language is a descendant of the Pascal language. It was developed in Switzerland, at ETH Zurich, in the mid-1970s by Niklaus Wirth, the same person who designed Pascal. The main innovation of Modula over Pascal is a modul ...
, Java (programming language), Java and
Microsoft Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washin ...
's Microsoft .NET, .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), variables, field (computer science), record fields, method (computer science), methods, procedure (computer science), procedures, Function (computer science), functions, subroutines, 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". However, this can make it harder to recognise that a given word is intended as an acronym. 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 A wiki ( ) is an online hypertext publication collaboratively edited and managed by its own audience, using a web browser. A typical wiki contains multiple pages for the subjects or scope of the project, and could be either open to the pub ...
pages. This convention was originally used in Ward Cunningham's original wiki software,
WikiWikiWeb The WikiWikiWeb is the first wiki, or user-editable website. It was launched on 25 March 1995 by programmer Ward Cunningham to accompany the Portland Pattern Repository website discussing software design patterns. The name ''WikiWikiWeb'' ori ...
, 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 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 interfaces 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 MyJobResume.pdf. Microblogging and social networking services 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. Hashtags, especially long ones, often use camel case to maintain readability (e.g. #CollegeStudentProblems is easier to read than #collegestudentproblems); this practice improves accessibility as screen readers recognize CamelCase in parsing composite hashtags. 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 criticised as negatively impacting readability due to the removal of spaces and uppercasing of every word. A 2009 study comparing
snake case Snake case (stylized as snake_case) refers to the style of writing in which each space is replaced with an underscore (_) character, and the first letter of each word is written in lowercase. It is a commonly used naming convention in computing, ...
to camel case found that camel case identifiers could be recognised with higher accuracy among both programmers and non-programmers, and that programmers already trained in camel case were able to recognise those identifiers faster than underscored snake-case identifiers. A 2010 follow-up study, with other subjects containing mainly pre-trained programmers and using an improved measurement method with use of eye-tracking equipment, indicates: "While results indicate no difference in accuracy between the two styles, subjects recognize identifiers in the underscore style more quickly."


See also


References


External links


Examples and history of CamelCase
als
WordsSmashedTogetherLikeSo

.NET Framework General Reference Capitalization Styles


by Bill Walsh, at The Slot
The Science of Word Recognition
by Kevin Larson, Advanced Reading Technology, Microsoft Corporation
Convert text to CamelCase


* [https://titlecapitalize.com/text-to-camelcase/ Convert text to CamelCase, Title Case, Uppercase and lowercase] {{Typography terms Capitalization Naming conventions Typography Source code