A common known use case of Variables is to accelerate parsing of pages, that transcluded the same template with the same arguments several hundred times before. Variables allow users to cache such data instead of reparsing the concerned code that often. However, to make templates using them work even if they are standalone, the first call of a variable often looks like this;
If this syntax is used nested, code becomes kind of hard to read and less clear, so I propose the introdunction of a new parser function (maybe called #varfallback), that behaves exactly like #var with the difference that it saves provided default values of variables if the variable isn't defined. It should probably produce an error detectable by #iferror if no value can be set, but this needs further consideration.
This additional parser function would allow this code:
to be written like this: