Naming Conventions (1) Case sensitivity and naming conventions

Source: Internet
Author: User

Naming Conventions (1) Case sensitivity and naming conventions

Although naming conventions are not necessary, following a set of consistent naming conventions during framework development will play a major role in improving the availability of the framework. In addition to consistent forms, the naming of each element in the framework is easy to understand, and the functions of each element are easily conveyed.

Case sensitivity rules for Identifiers

The PascalCasing Convention is used for all identifiers except parameters. It capitalized the first letter of each word in the identifier (including two or more characters in length), such as HtmlTag and Callback. Frequently Used namespace, interface, enumerated value, type name, and member (event, attribute, method, etc.) Name

Two letter acronyms are special cases. In this case, both letters must be capitalized, such as IOStream.

The cameCasing Convention is only used for parameter names. It is used to uppercase the first letter of all words except the first word of the identifier. Such as ioStream and htmlTag. Common Parameters in fields and methods.

Uppercase/lowercase letters

Use as few acronyms as possible as names of identifiers. This should be difficult for developers to understand, except for commonly used words such as XML, IO, and HTML.

The first letter of two letters must be capitalized unless it is the first word of a single camper parameter, void StartIO (ioStream, bool closeIOStream ).

The first letter of the first letter consisting of three or more letters must be capitalized, unless the first letter is the first word of a single camper style identifier. System. Xml.

Do not capital any letter of the first letter in the head of a single camper style identifier, no matter how long the first letter is.

Case sensitivity of Compound Words and Common Terms

Do not capital the first letter of each word in all closed compound words. For example, the following table

Case Sensitive

Do not think that all programming languages are case-sensitive and should not be case-sensitive.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.