Naming Conventions

Many programming languages, programming language communities, and local CodingStandards adopt various naming conventions, wherein the name assigned to an object/variable/type/function/whatever is augmented in some way to convey additional information (besides the basic purpose). Some of these schemes are commonplace; some are controversial--and some are compiler enforced.

Advantages of NamingConventions:

Disadvantages of NamingConventions:

Examples:


Anyone else seen these? (SmellsLikeJava) That naming standard is common in the C/C++ world, and certainly predates Java (though it isn't adopted by the C/C++ standard, which use lower_case for just about everything...with a few exceptions I can think of)


I have one naming convention that I'd like to see:

Lowercase l, the digit 1, and uppercase I are not to be used in names except when the context within the name (ie: spelling) makes it clear which one it is. Ditto O and 0.

Just spent 1/2 an hour trying to connect to SystemServicesS1 when I should have been connecting to SystemServicesSl - the "Sl" is for "StateLess", but being new to the project, I did not know this.

Better fonts would reduce the frequency of these errors. If you have Lucida Sans Console it is decent for distinguishing everything but "zero" and "big Oh". -- RobertField


See also: IdentifierPrefix

EditText of this page (last edited January 22, 2011) or FindPage with title or text search