identifier vocabulary. certain identifier names for specific use-cases, consistently used. finding names for variables is not necessarily easy, and time-consuming considerations about a name may in the long-run be appropriate but expensive to be repeatedly made. the compiler might not care about the names, humans do
some procedure or function
for inner parts of a procedure that are called recursively
for unspecified, in some way related bindings or arguments in obvious scope
(list-sort (l (a b) (< a b)) books)
also used for elements of a collection in expressions where it has mostly structural relevance, like in (map (l (a) (+ 1 a)) books)
for a continuation procedure. for procedures that use continuation-passing-style. that means, they pass on results to a procedure that will determine the final return value example. conflicts with the abc variables though
(define (integer-and-fraction number c) ; ...calculations... (c integer fraction)) (integer-and-fraction 3.72 (l (integer fraction) #t))
using a "namespace" name, for example the last part of a module name, for a set of procedures
for everything that can be considered the rest of something. might be used as a suffix (l (a . a-rest) #t)
the result of a procedure or similar. usually in cases where things have to happen before the result is returned but after it has been created
for destructive or otherwise side-effecting procedures where the warning character of it might make sense
.scm
examples
do not state their meaning
example: e: exception? element? event? error?
usually just the pattern as is needs to be searched an replaced. with one letter identifiers, all possible delimiters of a language must be considered when searching, and their scope
more examples here: http://larceny.ccs.neu.edu/doc/user-manual.chunked/ar01s05.html
already widely used for other formats
in a dynamically typed language, the type can change any time and that should be no problem. a type prefix burdens the developer with repeated variable-name refactoring when trying out things and modifying the code or type-casting. it is incredibly syntactically noisy. it is also not trustworthy and like comments quickly outdated and misleading
the minus is usually enough
avoid the camelcase craze. code that uses camelcase requires more documentation because the identifiers are not well readable and groupable based on their parts. systematic prefixing for identifier groups becomes nearly impractical. it requires upper-case characters and adds complexity and new rules concerning when something has to be uppercase and when not. sub-words begin with uppercase characters depending on context - if they are in or at the end of word. two different patterns for the same words are two different patterns to recognise for the same goal. the shift key is also not usually as easy to reach on keyboards than the minus