On Nov 19, 2007, at 4:18 PM, Mark Clements wrote:
>
> That's my point. Things like ISBN, RFC, etc. are magic words.
> Things like __NOTOC__ and {{PAGENAME}} are no more
> magic than [[Link]], and so shouldn't be described as such.
"Jay R. Ashworth":
I presume the issue is that they are handled by the
same code that does
the other MAGIC words?
That may be so, and if so, this is probably the historical reason. However,
based on various comments made on this list and elsewhere, I think that the
lack of distinction between the different purposes, syntaxes and behaviours
is causing confusion, so regardless of the historical reasons they should be
clearly differentiated.
This doesn't imply any code changes, of course. Simply a change in
nomenclature when documenting or talking about wikitext and the parser.
"Jim Hu":
Except that the docs on meta have always called them
magic words.
http://meta.wikimedia.org/wiki/Magic_words
And the docs have been written by developers who call them magic words for
the reasons above. This name is not helpful to users, and in fact I believe
it could be harmful. The more 'mystical' we make the parser, the more
daunting it is. Just because we have called them magic words in the past,
doesn't mean we should continue to do so if the effect is detrimental.
"Thomas Dalton":
The thing that makes them magic words is that they are
*words* (or, at
least, acronyms). "[[" is just punctuation. Even though they require
particular punctuation to work, they are still words that have some
extra purpose beyond just being text - we call that "magic".
Nope. I don't agree. There is no magic. Magic is when something happens
without you doing anything, such as for ISBN numbers.
Perhaps the issue here is that you are describing the siutation as it has
historically been, and I am describing the situation as I think it should
be. If we change the paradigm so that instead of "__TOC__ is a magic word"
we say "TOC is a parser-directive; parser directives are enclosed in double
underscores" then things become a lot easier, and general cases can be made.
In your example above TOC would be a word, and __ would be the
'punctuation'. Contrary to what you say, the word has no meaning without
the 'punctuation' (same as link text). Add the 'punctuation' and you add
an
extra meaning (same as link text).
Here is how I would formalise things:
Parser directives:
* Anything enclosed in double-underscore is a parser directive.
* A parser directive tells the parser to do something (or not to do
something) that affects the rendering of the article.
* Unrecognised parser directives are ignored and output as normal text.
* Recognised parser directives are: TOC, NOTOC, etc.
Built-in Variables:
* Built-in variables are enclosed in double curly braces.
* Unrecognised variable names are ignored and are treated as template
inclusions.
* Recognised variable names are: PAGENAME, BASENAME, etc.
- Mark Clements (HappyDog)