Bars Specification 0.1.0 — Overview¶
Conformance & normativity¶
Keyword convention¶
Scope¶
Core vs. optional extensions¶
Bars conformance comes in two tiers, layered so that the second is a superset of the first:
- Core — the template system alone. This is the whole of the language proper: the grammar, the pre-pass, the data model, rendering (segments, blocks, expressions, scoped variables, partials), errors, source locations, number rendering, iteration order, and string code-point semantics. Every one of these is normative for any Bars implementation.
- Full — core plus the standard library: a baseline roster of built-in transforms and
@envproperties, analogous to the standard library of a programming language. A full-tier implementation must support this baseline in addition to everything core requires.
An implementation therefore conforms at one of two levels: it may implement just the core template
system, or the core template system plus the standard library. A full-tier implementation is
free to add to its roster of transforms and its set of @env properties, and may even widen a
standard-library transform (see Implementation-Defined
Behavior), but it must support the standard-library baseline unchanged.
The two tiers are not versioned separately. A Bars version X.Y.Z describes the core template
system and the standard library together, so a release that only adds a standard-library transform
is still a new Bars version even though the core is unchanged. A core conformance claim is stated
against a version — "conforms to Bars X.Y.Z, core tier" — and remains meaningful even when the delta
from the previous version was purely standard-library: it means the core as of X.Y.Z. A full
conformance claim — "conforms to Bars X.Y.Z, full tier" — asserts the core and the complete
standard-library baseline of that version.
What each tier pins, and the freedoms that survive at each, are enumerated in Implementation-Defined Behavior.