Naming convention (programming)

naming conventionsnaming conventionidentifier naming conventionchoice of namesNamingnaming conventions for multiple-word identifiersunderscore method namingusually named
In computer programming, a naming convention is a set of rules for choosing the character sequence to be used for identifiers which denote variables, types, functions, and other entities in source code and documentation.wikipedia
110 Related Articles

Computer programming

programmingcodingcomputer programmer
In computer programming, a naming convention is a set of rules for choosing the character sequence to be used for identifiers which denote variables, types, functions, and other entities in source code and documentation.
Naming conventions for objects (such as variables, classes, procedures, etc.)

Hungarian notation

Perhaps the most well-known is Hungarian notation, which encodes either the purpose ("Apps Hungarian") or the type ("Systems Hungarian") of a variable in its name.
Hungarian notation is an identifier naming convention in computer programming, in which the name of a variable or function indicates its intention or kind, and in some dialects its type.

Camel case

camelCasecapitalisedinternal capitalization
Another approach is to indicate word boundaries using medial capitalization, called "CamelCase", "Pascal case", and many other names, thus rendering " " as either " " or " ".
In the 1970s and 1980s, medial capitals were adopted as a standard or alternative naming convention for multi-word identifiers in several programming languages.

Snake case

snakecase
An alternative is to use underscores; this is common in the C family (including Python), with lowercase words, being found for example in The C Programming Language (1978), and has come to be known as snake case.
, names for other delimiter-separated naming conventions for multiple-word identifiers have not been standardized, although some terms have increasing levels of usage, such as lisp-case, kebab-case, SCREAMING_SNAKE_CASE, etc.

Coding conventions

coding standardCoding standardscode conventions
Coding conventions
These conventions usually cover file organization, indentation, comments, declarations, statements, white space, naming conventions, programming practices,, architectural best practices, etc. These are guidelines for software structural quality.

Stropping (syntax)

stroppingstroppeddesignating
This is superficially similar to stropping, but the semantics differ: the underscores are part of the value of the identifier, rather than being quoting characters (as is stropping): the value of is (which is reserved), not (but in a different namespace).
Most loosely, one may use naming conventions to avoid clashes, commonly prefixing or suffixing with an underscore, as in or.

Naming convention

naming conventionsnomenclatureBoone Hospital Center
Naming convention
In computer programming, identifier naming conventions

Namespace

namespacesname spacehierarchical namespace
to help avoid "naming collisions" that might occur when the work product of different organizations is combined (see also: namespaces);
In programming languages lacking language support for namespaces, namespaces can be emulated to some extent by using an identifier naming convention.

Sigil (computer programming)

sigilsigilssuffixes
Sigil (computer programming)
Naming convention (programming)

Identifier

IDidentifiersidentification number
In computer programming, a naming convention is a set of rules for choosing the character sequence to be used for identifiers which denote variables, types, functions, and other entities in source code and documentation.

Subroutine

functionfunctionssubroutines
In computer programming, a naming convention is a set of rules for choosing the character sequence to be used for identifiers which denote variables, types, functions, and other entities in source code and documentation.

Source code

codesourcesource file
In computer programming, a naming convention is a set of rules for choosing the character sequence to be used for identifiers which denote variables, types, functions, and other entities in source code and documentation.

Software documentation

documentationdocumentingonline documentation
In computer programming, a naming convention is a set of rules for choosing the character sequence to be used for identifiers which denote variables, types, functions, and other entities in source code and documentation.

Programmer

computer programmerprogrammerssoftware developers
Reasons for using a naming convention (as opposed to allowing programmers to choose any character sequence) include the following:

Dogma

dogmatismdogmaticsdogmatic
Colloquially, this is said to be a matter of dogma.

Metadata

meta datameta-datacommunications metadata
to provide additional information (i.e., metadata) about the use to which an identifier is put;

Consistency

consistentinconsistentlogically consistent
to help formalize expectations and promote consistency within a development team;

Code refactoring

refactoringrefactoredrefactor
to enable the use of automated refactoring or search and replace tools with minimal potential for error;

Syntax (programming languages)

syntaxsyntacticallysyntactic
is syntactically correct, its purpose is not evident.

Linker (computing)

linkerlinkedlinkers
early linkers which required variable names to be restricted to 6 characters to save memory. A later "advance" allowed longer variable names to be used for human comprehensibility, but where only the first few characters were significant. In some versions of BASIC such as TRS-80 Level 2 Basic, long names were allowed, but only the first two letters were significant. This feature permitted erroneous behaviour that could be difficult to debug, for example when names such as "VALUE" and "VAT" were used and intended to be distinct.

BASIC

BASIC programming languagecompiled BASICBASIC IV
early linkers which required variable names to be restricted to 6 characters to save memory. A later "advance" allowed longer variable names to be used for human comprehensibility, but where only the first few characters were significant. In some versions of BASIC such as TRS-80 Level 2 Basic, long names were allowed, but only the first two letters were significant. This feature permitted erroneous behaviour that could be difficult to debug, for example when names such as "VALUE" and "VAT" were used and intended to be distinct.

Autocomplete

code completionautocompletionauto-completion
early source code editors lacking autocomplete

Word

wordsverballexical
A single word may not be as meaningful, or specific, as multiple words.

Programming language

programming languageslanguagedialect
As most programming languages do not allow whitespace in identifiers, a method of delimiting each word is needed (to make it easier for subsequent readers to interpret which characters belong to which word).