Naming convention (programming)

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;[1]
  • 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 a 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.[2] Many companies have also established their own set of conventions.

  1. ^ Derek M. Jones "Operand names influence operator precedence decisions" An experiment investigating the effect of variable names on operator precedence selection
  2. ^ Raymond, Eric S. (1 October 2004). "religious issues". The Jargon File (version 4.4.8 ed.). Retrieved 7 November 2011.

© MMXXIII Rich X Search. We shall prevail. All rights reserved. Rich X Search