Description
Terseness is an important goal of this proposal. Custom elements help a lot by removing a bunch of boilerplate HTML, but don't go far enough. Markdown, on the other hand, is very terse and readable but doesn't provide any semantic meaning (and may be too complex for our purposes anyway).
After a discussion on IRC with @domenic and @jorendorff, we think we need a shorthand for commonly used ECMAScript entities (see the readme for a list). At the very least, the following:
- Non-terminals. Any non-terminals can automatically be cross-referenced with the definition of that non-terminal.
- Cross references
- Code blocks
Additionally, es-algorithm elements need the following shorthands:
- Local variables
- Algorithm steps
Algorithms also use bold typeface to denote values like this
, true
, and false
but I think this can be the same shorthand as used for code blocks.
es-algorithm will also want to auto-xref references to internal algorithms using a heuristic of somesort (@jorendorff can comment on this)
Proposal So Far
Entity | Short-hand |
---|---|
Non-terminal | ?? |
Cross-reference | Markdown link syntax |
Code blocks / literals | Markdown code syntax (back-ticks) |
Local variables | Markdown italic syntax (variable) |
Algorithm steps | Markdown bulleted list syntax |
Algorithm steps could use markdown numbering syntax but putting numbers into the source text means adding/removing steps hoses up the diff so perhaps simply using bulleted list syntax would be good.
Open to additional suggestions!