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 PythonStyle Guide for Python CodeTraditional 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"). InIn transliterations
In the scholarly transliteration of languages written in other scripts, medial capitals are used in similar situations. For example, in transliteratedIn 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 titlesHistory 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 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 "Early use in trademarks
Since the early 20th century, medial capitals have occasionally been used forComputer programming
In the 1970s and 1980s, medial capitals were adopted as a standard or alternativeNextCh
" 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 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 _
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 and Python). However, some languages and programmers chose to avoid underscores—among other reasons to prevent confusing them with Whitespace character, whitespace—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 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.
The 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 * (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 NexusSpread 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 names in non-computer fields as well. Mainstream usage was well established by 1990: * (1980) EchoStar Communications Corporation, EchoStar * (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", "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. 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 (programming language), Pascal, Modula, Java (programming language), Java andWiki link markup
Camel case is used in some wikitext, wiki markup languages for terms that should be automatically linked to otherOther 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 comparingSee also
References
External links