-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
The spec describes 4 rule variables, n
, m
, c
, and t
.
yaml-grammar/yaml-spec-1.2.yaml
Line 91 in 1504782
# n -- Current indentation level. An integer indicating the number of spaces. yaml-grammar/yaml-spec-1.2.yaml
Line 93 in 1504782
# m -- Additional indentation level. An integer indicating number of spaces. yaml-grammar/yaml-spec-1.2.yaml
Line 95 in 1504782
# c -- Current context. String that is one of: yaml-grammar/yaml-spec-1.2.yaml
Line 103 in 1504782
# t -- How to treat whitespace after a literal scalar. One of:
I find a terse, single letter, variable in the spec difficult for two reasons:
- When looking at the rules, it is difficult to remember what each letter means. If the variables were named with a brief summary of the actual value, it would be easier to remember the actual meaning.
- The short names make searching for usages impossible. If the names were distinct, then it would be possible to quickly find usages and the definition.
I would find the spec easier to understand if the names were more descriptive. For example:
n
—currentIndent
m
—additionalIndent
c
—currentContext
t
—whitespaceTrim
Metadata
Metadata
Assignees
Labels
No labels