I was looking at the documentation for the range Operator, and noticed this block:
[range[<begin>]]
[range[<begin>],[<end>]]
[range[<begin>],[<end>],[<step>]]
This really makes it look as though I could write
<$let begin="1" end="5">>
<<list-links filter:"[range[<begin>],[<end>]] ">>
</$let>
But I know that’s not allowable. One rule I’ve internalized for filters is that anything ending in three brackets must be a syntax error. (In fact, any triple brackets in a filter is an error, and every filter run must end in exactly two, with the final one being ]
.)
So clearly <begin>
, <end>
, and <step>
are meant to be documentation markers, and not real syntax.
I’m wondering if we should introduce some other symbols to represent these documentation markers, ones not likely to be confused with actual syntax elements.
I was considering the guillemets:
[range[«begin»]]
[range[«begin»],[«end»]]
[range[«begin»],[«end»],[«step»]]
There is a problem for those used to English keyboard layouts: they’re harder to type. I don’t think there’s any good way around that. TW syntax has claimed all the likely brackets on the keyboard, especially once multi-valued variables are included.
But I don’t think we want our documentation to have this sort of confusion.
Perhaps we could use this instead:
[range«begin»]
[range«begin»,«end»]
[range«begin»,«end»,«step»]
with the understanding that «
- »
represents any of our bracket pairs, [
- ]
, <
- >
, {
- }
, and one day (
- )
.
What do you think?