EN
Programming - camelCase definition with example
6
points
In this article, we would like to explain the concept of the camelCase
naming style.
Example name:
camelCaseNameExample |
The main idea is to:
- always start the name with a small letter,
- mark worlds join using capital letters.
- the abbreviation:
- should be converted to small letters when starts the name,
- when is located inside the name:
- must be started with a capital letter,
- can be written with all capital letters,
- can be capitalized to make the name more readable.
Hint: using single or multiple abbreviations inside the name, select rules to make, as possible, names maximally readable.
Other examples:
Input (regular text) Output (in cameCase)
-------------------- --------------------
This is example text thisIsExampleText
HTML content htmlContent
main HTML content mainHTMLContent or mainHtmlContent
e-book eBook
new HTTP APR library newHttpAprLibrary <---- to increase readability