Pascal case(equires that the first letter of a variable be in upper case.)
PascalCaseVariable
Camel case(allows the first letter to be either upper or lower case.)
To clarify between the two options, the terms UpperCamelCase and lowerCamelCase are often used. Pascal case would be equivalent to UpperCamelCase.
camelCaseVariable or CamelCaseVariable
snake case (separates words with an underscore)
snake_case_variable
kebab(烤肉串) case(separates words with an dash)
kebab-case-variable
Pascal case naming convention problems
Acronyms and abbreviations can present a challenge for developers who use the PascalCase naming convention. For example, if a developer was to use the NASA images APIs, the following two variable names would comply with Pascal case naming standards:
- NASAImages
- NasaImages
The latter is arguably easier to read. However, the former respects the official NASA trademark.
In addition, the manner in which the term URL is written is a prime example of an inconsistent application of PascalCase throughout the industry. For example, Java network APIs always reference the term URL in all caps, as with the classes URLConnection and URLEncoder. In contrast, the Spring APIs include classes such as UrlResource and UrlTag.
The inconsistent application of any naming convention may result in software defects that are difficult to diagnose. As such, it is important for programming teams to decide how to apply naming conventions for the various corner cases that arise in the software development lifecycle.