This naming pattern for Webel argument help holders for Mathematica is used throughout all Webel IT Australia coding of Mathematica libraries.
Example:
$arg$doShow = "doShow";
$info$arg$doShow = "Whether to show something.";
def$arg$doShow = True;
$warn$arg$doShow = "Setting this True may make the display much larger.";
Where an argument is required, no 'def$arg$' is provided, and the Webel help Rule maker (used to register it with the Webel help system) will detect that it is a required argument.
An additional "type" indicator (used only for documentation) may also be provided:
type$arg$doShow = (True|False);
Or using a Webel pattern helper:
type$arg$doShow = $pat$bool;
Additionally, a UML/SysML style multiplicity indicator (used only for documentation) may be provided as:
$mult$arg$doShow = "[0..1]";
An '$arg$ may also optionally have a label for GUIs and other views (although this is not used as much as for '$opt$' options):
$lab$opt$doShow = "Show?";
The Webel utility functions are able to leverage this pattern to create ::usage documentation Strings (via the Doc` package), for the Webel Var` variables Entity registry, for the Webel code-oriented HelpF` and HelpO` help registries, and in many other useful ways, such as with Tooltip info in tables, GUIs, and other displays.
This naming pattern works well for prompting in Mathematica notebooks and in IDEs (so much less typing of Strings)!
Functions that use an argument may choose to leverage the 'def$arg$' default for the Pattern template for a particular argument or override it. The use of the 'def$arg$' default for an argument Pattern makes it easier to change the policy for the default across a project (nice and DRY).
The '$arg$' convention is often used together with these Webel help holder conventions: There is a detailed technical slide trail describing how the Webel naming conventions for Wolfram Language code work together:If you are a fan of object-orientation (and have understood it CAN be used together with functional programming), you might be wondering why the policy isn't encapsulated as a class. Mathematica does not yet have vendor supported OO. The Webel argument help holder naming pattern shown can indeed be used with the user contributed MTools package for OO in Mathematica, but is also designed to work with regular Wolfram Language usage.