Acronym and Abbreviation
An acronym is often used in IT terms. It is an abbreviation formed from the initial components in its compound words. Generally, an acronym is expressed in only uppercase letters, regardless of the context, and it is read as one words. If an acronym is read by each letter, it is called "Initialism". However in this article an initialism is treated as an acronym.
Examples of Acronym
|NATO||North Atlantic Treaty Organization|
|ASCII||American Standard Code for Information Interchange|
|NASA||National Aeronautics and Space Administration|
|ASEAN||Association of South-East Asian Nations|
Examples of Initialism
|HTML||Hyper Text Markup Language|
|URL||Uniform Resource Locator|
An abbreviation is made from one or some words by omitting. Generally in English, an abbreviation is written in upper case. An acronym is considered to be part of the abbreviation.
Since the acronym also abbreviations also a kind of word, it is used as the words constituting the compound words. "UIView" and "NSArray" are familiar for iOS programmers.
The following terms are examples that is actually defined in the program language. They contain an acronym or an abbreviation.
|PHPUnit||PHP + Unit||PHP|
|IOException||IO + Exception||Java|
If an acronym is included in the camelCase and StudlyCaps, concatenate the acronym remains uppercase in relatively many programming languages.
Problem of Acronym and Abbreviation
It was explained that camelCase and snake_case can be converted into each other on the previous page. However, if camelCase or snake_case has an acronym, it makes a problem for mutual conversion. To convert by camelCase ⇒ snake_case ⇒ camelCase, can not restore original camelCase. It is not kept reversibility between the camelCase and snake_case.
- PHPUnit ⇒ php_unit ⇒ PhpUnit
- getUTCDay ⇒ get_utc_day ⇒ getUtcDay
Some typical libraries contain an algorithm to convert as follows. It can restore original camelCase. However, it is not natural because token of acronym is not kept in snake_case.
- PHPUnit ⇒ p_h_p_unit ⇒ PHPUnit
- getUTCDay ⇒ get_u_t_c_day ⇒ getUTCDay
Compound Words by Only One Word
Even if the compound words contains only one word, can interconvert of camelCase and snake_case. But also an acronym makes a problem. Following examples are not natural interconversion.
- HTML ⇒ html ⇒ Html
- HTML ⇒ h_t_m_l ⇒ HTML