Filter vs subfilter
In the below example, if you replace filter<myfilter> with subfilter<myfilter>, you will output the text length rather than the tiddler titles. Go ahead and try that on tiddlywiki.com
The filter operator allows you to limit the output according to the criteria provided by its operand, without changing the input. The most common use case for subfilter is to be able to use a text reference or variable as a filter.
<$vars myfilter="[get[text]length[]compare:integer:gteq[1000]]">
<$list filter="[tag[HelloThere]search[po]filter<myfilter>]">
<div>
<$link>
<$text text=<<currentTiddler>>/>
</$link>
</div>
</$list>
</$vars>
Why named filter run prefixes?
else vs ~ vs :else
As explained in the link above, existing filter run prefixes have also been made available as named prefixes for consistency. So ~ and :else are identical. (Moving forwards I would personally transition to only using named run prefixes, with the other single character prefixes being there for backwards compatibility.)
As for else vs :else, the former is a filter operator and used within a filter run and represents a single filter step, whereas the latter is a filter run prefix.
Filter runs:
Filter operators and filter steps:
else can be used as a filter step to output a fixed string, variable or text reference, if the filter run so far has produced no value. (In the below filter the portion "else[yes]" is a filter step, where as the entire line is a single filter run.)
[[HelloThere]is[missing]else[yes]]
:else can be used to run an entire new filter run if the previous filter runs have provided no output.
[[HelloThere]is[missing]get[text]] :else[{config}get[text]]
The above filter expression consists of two filter runs, the second has the prefix :else.
I hope this helps. It's a bit tricky to know what needs explanation as I personally do find the existing documentation on filter syntax quite good,
if read carefully and in its entirety. Hopefully others can fill in if there are still things that are unclear.
PRs with documentation improvements are always welcome.
Cheers,
Saq