Naming conventions: Difference between revisions
Content added Content deleted
(Scala contribution added.) |
|||
Line 1,142: | Line 1,142: | ||
</lang> |
</lang> |
||
=={{header|Scala}}== |
|||
An excellent documentation about naming is given in [https://docs.scala-lang.org/style/naming-conventions.html the Scala Style Guide.] |
|||
=={{header|Tcl}}== |
=={{header|Tcl}}== |
||
Tcl leaves nearly all matters of variable and procedure naming up to the programmer, so styles vary. Variables are not declared by type. However, each variable contains a scalar, list, or hash array. Once assigned a scalar, list, or array, a variable must be unset to be re-assigned a different kind (scalar, list or array). |
Tcl leaves nearly all matters of variable and procedure naming up to the programmer, so styles vary. Variables are not declared by type. However, each variable contains a scalar, list, or hash array. Once assigned a scalar, list, or array, a variable must be unset to be re-assigned a different kind (scalar, list or array). |
||
A few conventions are common: |
A few conventions are common: |
||
* Names typically use alphanumeric characters ('''a-zA-Z0-9_'''). Use of other characters are allowed, but may require extra quoting with curly braces ('''{}''') (See ref: [http://wiki.tcl.tk/10259 Rule #7]) |
* Names typically use alphanumeric characters ('''a-zA-Z0-9_'''). Use of other characters are allowed, but may require extra quoting with curly braces ('''{}''') (See ref: [http://wiki.tcl.tk/10259 Rule #7]) |
||
* Two naming styles dominate for variables: '''all_lower_case_with_words_separated_by_underscore''' or '''camelCase''' |
* Two naming styles dominate for variables: '''all_lower_case_with_words_separated_by_underscore''' or '''camelCase''' |