On 4/14/06, William Allen Simpson <william.allen.simpson(a)gmail.com> wrote:
Please don't implement either of these.
It doesn't make sense to have whitespace between the # and the if, and no
demonstrable reason to have it before the colon.
For formatting, to make it easier to read.
The logic of qif was often confusing. There's
only very short term
advantage to backward compatibility. Having #eval and #if work like
other languages will be easiest to document in the long term. Remember,
features aren't of much use without easy to understand documentation.
Having #if test for blank/non-blank makes more sense. #ifexpr now
wraps what would have previously been a call to #if *and* #expr into a
single call. If you still need to test against 0 or 1, you can use
#ifeq.
Actually, the trailing pipe doesn't sound
reasonable to me, as it only works
with "else" parameters, requiring logic to be inverted. There's a couple
of
fairly simple alternatives (standard html syntax, or the {{!}} template), and
they work in a consistent, predictable, symmetric manner. Again, ease of
documentation.
Agreed, this is a bad idea IMO. There's a better idea on Meta at
[[Talk:ParserFunctions]] to allow "wikisyntax" between {{#: <syntax>
}} (I think it's mentioned here on the mailing list too), and this
seems like a very good idea IMO. It would allow full wiki-table markup
to be included inside conditionals (so those annoyed by XHTML could
stick with what they know/like, in theory).
-L