Naming conventions: Difference between revisions

m
no edit summary
(Added Lua version)
mNo edit summary
Line 581:
=== Variables ===
In 2017, the jq global $ARGS was introduced. It behaves as if it had been defined on the command-line. As with all such global variables, it can be shadowed.
 
=={{header|Julia}}==
 
In general, modules and type names use capitalization and camel case: module SparseArrays, struct UnitRange.
 
Variables and functions are lowercase (maximum, convert) and, when readable, with multiple words squashed together (isequal, haskey).
When necessary, use underscores as word separators. Underscores are also used to indicate a combination of concepts
(remotecall_fetch as a more efficient implementation of fetch(remotecall(...))) or as modifiers (sum_kbn).
 
A function that modifies its arguments whould end with an exclamation point as in changewindow!
 
Conciseness is valued, but avoid abbreviation (indexin rather than indxin) as it becomes difficult to remember whether and how particular words are abbreviated.
 
=={{header|Kotlin}}==
4,105

edits