The following conventions define the standards for naming modules, routines and variables. The purpose of these conventions is uniformity and readability of code.
When creating names, remember that code is written once but read many times. Make names meaningful and readable. Avoid obscure abbreviations.
Names of routines and variables are composed of upper- and lowercase characters and no underbars. Capitalize each "word" except the first:
aVariableName
Every module has a short prefix (two to five characters). The prefix is attached to the module name and to all externally available procedures and variables. (Names that are not available externally need not follow this convention.)
fooLib.tcl
module name
fooObjFind
procedure name
fooCount
variable name
Names of procedures follow the module-noun-verb rule. Start the procedure name with the module prefix, followed by the noun or object that the procedure manipulates. Conclude the name with the verb or action that the procedure performs: