Many languages have naming conventions regarding the identifiers used in the language, its libraries, and programs written in the language. Such conventions, which may be classified as de facto or de jure depending on how they are enforced,
often take the form of rules regarding prefixes, suffixes, and the use of upper-case and lower-case characters.

The naming conventions are sometimes a bit haphazard, especially if the language and/or library has gone through periods of evolution. (In this case: give a brief example and description.)

Document (with simple examples where possible) the evolution and current status of these naming conventions.
For example, name conventions for:

 Procedure and operator names. (Intrinsic or external)
 Class, Subclass and instance names.
 Built-in versus libraries names.


If possible, indicate where the naming conventions are implicit, explicit, mandatory or discretionary.
Any tools that enforced the the naming conventions.
Any cases where the naming convention as commonly violated.

If possible, indicate where the convention is used to hint at other issues. For example the C standard library uses a prefix of "_" to "hide" raw Operating System calls from the non systems-programmer, whereas Python embeds member functions in between "__" to make a member function "private".

See also

 Wikipedia: Naming convention (programming)


 
Naming conventions
 
1) global names
 
- a name is a group of any character except space and curly braces {}
  for instance "add", "+", "123", "()", "a.b.c", "...", ...
 
- but giving a variable the name of the 9 special forms (keywords) 
    ["lambda", "def", "if", "let", "quote", "macro", "script", "style", "require"] 
or of one of the more than 170 primitives 
    ["div", ..., "+", ..., "cons", ..., A.new, A.first, A.rest, ..., long_add, ...] 
is possible but is obviously strongly discouraged.  
 
- when a function calls an helper function, it's better to prefix the helper function's name 
  with the calling function's name. For instance the function "fibonacci" sets 
  some initializations and calls the recursive part "fibonacci.rec".
 
- functions organized into sets (libraries) should be named with a common prefix. 
  For instance the set of functions working on complex numbers [ "C.new", "C.x", "C.y", "C.+", "C.*", ...], 
  suggesting object-oriented programming.
 
2) local names
 
Consider this example:
 
{def add {lambda {:a :b} :a+:b is equal to {+ :a :b}}}
-> add 
{add 3 4}
-> 3+4 is equal to 7
 
When the add function is called the occurences of arguments {:a :b} are replaced by the given values, [3 4], 
in the body of the function ":a+:b is equal to {+ :a :b}", leading to "3+4 is equal to {+ 3 4}" and finally 
to "3+4 is equal to 7". Note that the character "a" inside the word "equal" has not been replaced. 
So generally speaking:
 
- inside a function local defined arguments must be prefixed by a colon, ":",
- they must have a null intersection. For instance this arguments list {:a1 :a2} is valid 
  because the intersection of :a1 and :a2 is null, but this one {:a :a1} is not, 
  because the intersection of :a and :a1 is :a.
- an alternative could be to prefix and postfix names, say :a: and :a1: which have a null intersection. 
  It's a matter of choice let to the coder. In all cases naming must be done with the utmost care. 
 