(source) C. Scott Ananian: Ideas/A Plan for Global Templates

Apologies if you can here via a link which promised "some of my own ideas": this is a work in progress, and more of a collection of outline topics and notes-to-self than a coherent proposal for now. But if you're interested, contact me and I can probably spin these into a proper proposal.

Desiderata

Separating code from data from content

Everything localizable

More hooks from articles

Not just "the data object for an article" and "the code module for an article" but also "the layout" for an article -- and make this extensible! In some sense this is what "subpage" is for, but I want better UX and tabs and maybe orthogonal axes, although we can get pretty far with [[ArticleTitle/code/doc/es]] (the spanish translation of the documentation for the code module for article ArticleTitle). (Isn't this just Multi-Content Revisions?)

Remove one to add one

Any new template mechanism must be powerful/compatible enough to completely replace one of our four-ish existing mechanisms. We can't just keep building new things, we must provide some transition mechanism (build incrementally, or provide translators, or...) that would prevent this from just adding "one more (unmaintained) template mechanism" to MediaWiki.

Fragment composition and memoization

Composition *should not* be turing-complete! (But it's so easy to make a turing-complete system without trying hard...)

Each fragment renderer should be able to register dependencies in a uniform manner, aka generate an appropriate hash key for memoization; also register time-dependency, indeterminancy, etc. WRT args and return types of fragment generators, see below.

Types

Regarding the four "types of types":

In the near-term, we'll introduce a new "structured argument" type of parser function argument; see below.

Proposals

Translate

Scribunto

TemplateData

Core

C. Scott Ananian [[User:cscott]]