(source) C. Scott Ananian: Ideas/A Dozen Visions for Wikitext/Syntax uniformity

Syntax uniformity

Syntax uniformity

Syntax uniformity is another thing you might have noticed in Grunge.  Wikitext has a large number of different forms for effectively the same thing.  We have behavior switches, magic variables, parser functions, templates, extension tags, hidden links, and media links.  Each has different rules for case-sensitivity, different ways of parsing (or forbidding) arguments, and different escape mechanisms for content.

So we’re going to add a standard “curly brace” form for each of these. Parser functions largely use this syntax already.  Templates are already in “curly brace form”.  Extension tags already have a curly-brace form with the {{#tag}} parser function.  We’re not going to remove the other forms, at least not yet (although Grunge removed them!) but we’ll always have a “standard” form to use if (for example) we need to pass an argument, or want to use a consistent escape mechanism or a long argument form.

Name Wikitext Proposed standard curly-brace form Notes
Behavior switch __TOC__ {{#toc}}, {{#toc:compact}} Proposed new form allows arguments; phab:T19587
Magic variable {{CURRENTYEAR}} {{#currentyear}}
Parser function {{#dateformat:...}} {{#dateformat:...}} No change.
Template {{Citation needed}} {{Citation needed}} No change.
Extension tag <ref>...</ref> {{#tag:ref|...}} Already exists.
Hidden link [[Category:...]] {{#category:...}}
Media [[File:...]] {{#media:...}} phab:T318433#10397735
Different treatments of: case-sensitivity, argument styles (none, named, positional), escaping. Always: case-sensitive, hash-prefixed, named arguments, consistent escaping (including long arguments, phab:T114432)

Next section: Colon replacement

C. Scott Ananian [[User:cscott]]