format: frame the name context as an optional identifier and groundwork#251
Merged
Conversation
Contributor
|
Clarify what a `name` context is — and, honestly, what it is not yet. A `name` is an optional identifier attached to a context. Today it acts as a label, most usefully inside a `pick`, whose alternatives are listed inline: a name distinguishes those alternatives from one another when several contexts may apply at a point in execution. The format does not yet define any way to reference a context by its name, so a declared name is currently inert — a label only. Stating that makes the name deliberate groundwork: establishing the identifier now lets a future name-based `pick` selection reference an alternative by its name instead of listing it inline. Updates the schema description and the spec page together. Spec-only change: no code or type changes.
f120730 to
d3cb297
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clarify what a
namecontext is — and, honestly, what it is not yet.A
nameis an optional identifier attached to a context. Today it actsas a label, most usefully inside a
pick, whose alternatives are listedinline: a name distinguishes those alternatives from one another when
several contexts may apply at a point in execution.
The format does not yet define any way to reference a context by its
name, so a declared name is currently inert — a label only. Stating that
makes the name deliberate groundwork: establishing the identifier now
lets a future name-based
pickselection reference an alternative by itsname instead of listing it inline.
Updates the schema description and the spec page together. Spec-only
change: no code or type changes.