Naming conventions: Difference between revisions

Added Arturo implementation
m (→‎Constants: typo)
(Added Arturo implementation)
Line 189:
=={{header|AntLang}}==
<lang AntLang>variables-are-often-lower-case-and-seperated-like-this-one</lang>
 
=={{header|Arturo}}==
 
There are no strict rules for naming new words in Arturo, apart from the ones generally defined in the grammar. That it is <code>any letter lowercase-or-upcase, optionally followed by a question mark</code>.
 
In practice, a couple of simple naming conventions are followed:
 
* for function names or variable names, all-lowercase is preferred, e.g <code>variable</code>
* names composed by more than one words, we'd use *camelCase*, e.g. <code>myVariable</code>
* user constants could be written with a capital first letter and *PascalCase*, e.g. <code>MainData</code>
* functions returning a boolean value (in Arturo: "predicates") are suffixed with a question mark (<code>?</code>), e.g. <code>prime?</code>
 
=={{header|AWK}}==
1,532

edits