It’s been 15 years since the birth of Apple mobile phone, and we are already familiar with the word iPhone.
If you are careful, you must have discovered that only P is a capital letter in the iPhone product line, not just iPhone, but also iPad, iPod, iMac, etc. This is true for Apple products.
Why is the only letter P in the iPhone product line capitalized?
In fact, Apple’s naming follows a rule-CamelCase (also known as camel case nomenclature). This is a set of naming rules (conventions) when writing computer programs. In order for programmers to communicate their codes more easily among peers, they often adopt a unified naming method that is more readable. Camel-style nomenclature is when a variable name or function name is a unique identifier composed of one or more words connected together. The first word starts with a lowercase letter; each word starting from the second word The first letters of are all capital letters.
For example: myFirstName, myLastName, such variable names look like camel humps rising one after another, hence the name.
In addition, camel-style nomenclature can be divided into "small camel hump method" and "big camel hump method". The small camel case method is like iPhone, except for the first word, the first letter of other words is capitalized. The big camel case rule is to capitalize the first letter of the first word, such as MyDrivers, public class DataBaseUse, etc.
However, the naming rules of camel nomenclature can be regarded as a convention, not absolute or mandatory, in order to increase recognition and readability.
The above is the detailed content of Why is there only a capital letter P in the iPhone product line?. For more information, please follow other related articles on the PHP Chinese website!