The third operation of modern software engineering

Source: Internet
Author: User

There are three types of naming methods I know:

1. Hump Naming method

Features: The first letter of a variable name is lowercase, the remaining words are capitalized, the middle cannot use spaces, '-' and ' _ '.

Example: Nameformethod, Nameforclass, etc.

2. Pascal's nomenclature (The Big Hump name method)

Features: Similar to the Hump naming method, except that the first letter of the constituent variable is capitalized.

Example: Nameformethod, Nameforclass, etc.

3. Hungarian nomenclature

Feature: This method requires that you precede each variable name with a lowercase letter that represents the data type or purpose of the variable.

Example: A. A lowercase letter indicating the type of the variable

Iage represents age as integral type

B. Lowercase letters indicating the use

The imybinder is represented as an interface interface

A language generally not only uses a nomenclature, usually composed of several naming methods, so that the code style beautiful, beneficial to reading.

Like in Java:

The class name generally uses the big hump name method. Example: Interface Name: Studentinterface.java Implementation class: Studentinterfaceimpl.java

The method name is usually used in the hump naming method. Example: GetName () setage (), etc.

The name of the variable is usually used in the hump nomenclature. Example: userName password is also used in combination with the Hungarian nomenclature and the Hump nomenclature. Example: Intage,strname and so on.

    

The third operation of modern software engineering

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.