On Fri, 14 Apr 2006 13:51:58 +1000
Tim Starling <t.starling(a)physics.unimelb.edu.au> wrote:
The main reason I'm calling it a trial is to avoid
appearing to have made a
unilateral decision to
enable it permanently. The critics of this concept now have one final chance
to turn community
opinion against it, before it becomes ingrained. However the reception has
generally been positive.
I've received a number of private compliments on it, in addition to what can
be seen publically.
There's also the possibility of bugs and syntax changes. We've already had
one syntax change: I
changed the whitespace handling in #if to mirror the behaviour in template
parameters, to allow for
easier conversion and neater multi-line syntax. There's also a pending
suggestion to allow
whitespace between the #if and the colon, and a suggestion to make #if treat
"0" as true, both of
which may well be implemented.
One of Gangleri's syntax suggestions sounded quite reasonable and I may well
implement it. The idea
if I understand it correctly was to treat pipe characters beyond the
specified maximum number of
arguments literally, e.g. {{#if: 1 || literal pipe: | }}.
-- Tim Starling
Thank you Tim for your work and for working on extending the template syntax
which was pending for a while.
Sorry if some of my comments have been 'sarcastic' but I never tried to be
polemic. Thanks for the trimming and supporting new lines between the
delimitors.
My comments where mainly based on the "missing somthing" in the syntax, on the
interaction with other features. As has been suggested at
http://meta.wikimedia.org/wiki/Talk:ParserFunctions there are 'solutions' to
implement different needs (as table support) but these are 'workarounds'
falling back to HTML syntax usage, escaping tricks and various usage of expoits
(because of the knowledge how the implementation is today).
I suppose that the "missing somthing" is a "grouping construct" and
the syntax
can be realy simplistic:
{{# <wikisyntax> }} where <wikisyntax> is whatever valid wikisyntax as
(sub)table code etc.
The idea comes from
http://meta.wikimedia.org/wiki/Talk:ParserFunctions#.23switch
where
{{#switch: VALUE-TO-BE-TESTED
| foo|bar = hello
| baz = world
| = Neither ''foo'' nor ''bar'' nor even
''baz''
}}
could also be
{{#switch: VALUE-TO-BE-TESTED
| foo|bar|bla|more = hello
| baz = {{# world }}
| = Neither ''foo'' nor ''bar'' nor
''bla'' nor ''more'' nor even ''baz''
}}
regarding {{#if: 1 || literal pipe: | }} I suggest that if you could implement
{{# <wikisyntax> }} then the best way would be to output FAST and LOUD an
'Invalid trailer' error message. This defetes arguments that the syntax is not
symmetrical with respect to the <then> and <else> branches.
{{# }} will be / should be stable agains {{subst:}} (and the {{substall:}}
feature request).
best regards reinhardt [[user:gangleri]]