Concept

Naming convention (programming)

Summary
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. Reasons for using a naming convention (as opposed to allowing programmers to choose any character sequence) include the following: To reduce the effort needed to read and understand source code; To enable code reviews to focus on issues more important than syntax and naming standards. To enable code quality review tools to focus their reporting mainly on significant issues other than syntax and style preferences. The choice of naming conventions can be an enormously controversial issue, with partisans of each holding theirs to be the best and others to be inferior. Colloquially, this is said to be a matter of dogma. Many companies have also established their own set of conventions. Benefits of a naming convention can include the following: to provide additional information (i.e., metadata) about the use to which an identifier is put; to help formalize expectations and promote consistency within a development team; to enable the use of automated refactoring or search and replace tools with minimal potential for error; to enhance clarity in cases of potential ambiguity; to enhance the aesthetic and professional appearance of work product (for example, by disallowing overly long names, comical or "cute" names, or abbreviations); to help avoid "naming collisions" that might occur when the work product of different organizations is combined (see also: namespaces); to provide meaningful data to be used in project handovers which require submission of program source code and all relevant documentation; to provide better understanding in case of code reuse after a long interval of time. The choice of naming conventions (and the extent to which they are enforced) is often a contentious issue, with partisans holding their viewpoint to be the best and others to be inferior.
About this result
This page is automatically generated and may contain information that is not correct, complete, up-to-date, or relevant to your search query. The same applies to every other page on this website. Please make sure to verify the information with EPFL's official sources.