Dot and bracket path segments are interchangeable everywhere
The rule
Normative: this is the rule
- A property path may be written with dot segments, bracket segments, or a mixture of the two.
- An implementation normalizes them to a single form before parsing, and every place it reads a property path resolves the two spellings identically.
What it means
Dot and bracket segments are not two dialects an implementation merely
tolerates side by side — they are normalized to one form before anything is
parsed, so no code path can see the difference. A dot segment reaching into a
list by numeral, users.0.name, is not a special case handled separately
from store.name: it normalizes the same way, and the same value comes back
whichever spelling reached it.
Example
The same value in the evaluation context, reached once as store.name and
once as [store][name]:
"Test Store"Rule identifiers are permanent and are never renumbered. Each implementation publishes its own standing against these rules; this specification does not.spec 1.0-draft · LANG-17 · changed in spec 1.0