You mentioned people fuss about the use of three types brackets. I don't find anything bad with that. (Many sucessful templating system use customs brackets.) At worse, you'll have to escape parens and square brackets in your template. (We need to do the latter here at PerlMonks.) What I find to be the insurmountable obstacle is the possibility that a line a screen down might be executed before the line I'm looking at.
You only need a few forms of flow control. No matter how many plugins you have, you'll only have a handful of flow control directives. Too many would just lead to confusion, especially in a template system. Your implication that the number of plugins makes this impractical is nonsense.
Perl uses the concept of keywords (if, for, etc) to control the flow. You could do the same (i.e look for special words like "case".) If you want to extend the flow control to the plugins, you might find the approach taken by Paul Lucas in his HTML-Tree templating system (not to be confused with the HTML::Tree parser). The value returned by the plugin controls whether the body of the tag is skipped or not, and whether the tag is repeated or not. This would actually mesh nicely with your existing syntax.
Even Perl with its millions of plugins (modules) doesn't need to alter precedence in the manner you suggest*. Unless you have have a context-specific grammar (which would be bad for a templating system), there's no reason for this.
* — It has BEGIN, but it's rarely needed. A templating system would not need it.
In reply to Re^3: more bracket chaos
by ikegami
in thread more bracket chaos
by simonodell
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |