Skip to content

Commit 68bc42a

Browse files
committed
Lee editorial updates
1 parent f04f86f commit 68bc42a

File tree

2 files changed

+28
-35
lines changed

2 files changed

+28
-35
lines changed

spec/Appendix A -- Notation Conventions.md

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -214,40 +214,36 @@ Fibonacci(number):
214214
- Return {Fibonacci(previousNumber)} + {Fibonacci(previousPreviousNumber)}.
215215

216216
Note: Algorithms described in this document are written to be easy to
217-
understand. Implementers are encouraged to include equivalent but optimized
218-
implementations.
217+
understand. Implementers are encouraged to include observably equivalent but
218+
optimized implementations.
219219

220220
## Data Collections
221221

222-
A data collection is a finite, iterable aggregation of elements whose iteration
223-
order is not necessarily stable. This specification describes the semantic
224-
properties of data collections using types like "list", "set" and "map". These
225-
describe observable data collections, such as the result of applying a grammar
226-
and the inputs and outputs of algorithms. They also describe unobservable data
227-
collections such as temporary data internal to an algorithm. Each data
228-
collection type defines the operations available, and whether values are unique
229-
or ordered.
222+
Algorithms within this specification refer to abstract data collection types to
223+
express normative structural, uniqueness, and ordering requirements. Temporary
224+
data collections internal to an algorithm use these types to best describe
225+
expected behavior, but implementers are encouraged to provide observably
226+
equivalent but optimized implementations. Implementations may use any data
227+
structure as long as the expected requirements are met.
230228

231229
**List**
232230

233-
:: The term _list_ describes a sequence of zero or more values, which may
234-
contain duplicates. Currently, all lists in this specification are ordered, but
235-
for clarity the term "ordered list" may be used when an order is semantically
236-
important.
231+
:: A _list_ is an ordered collection of values which may contain duplicates. A
232+
value added to a list is ordered after existing values.
237233

238234
**Set**
239235

240-
:: The term _set_ describes a collection of zero or more values, which may not
241-
contain duplicates. Each value is considered a "member" of the set. A set is
242-
unordered unless explicitly stated otherwise (as an "ordered set"). For clarity,
243-
the term "unordered set" may be used when the lack of an order is semantically
244-
important.
236+
:: A _set_ is a collection of values which must not contain duplicates.
237+
238+
:: An _ordered set_ is a set which has a defined order. A value added to an
239+
ordered set, which does not already contain that value, is ordered after
240+
existing values.
245241

246242
**Map**
247243

248-
:: The term _map_ describes a collection where each element is a pair (called an
249-
"entry") consisting of a key and a value. Keys are unique: no two entries with
250-
the same key may exist in the same map, but values may repeat. A map is
251-
unordered unless explicitly stated otherwise (as an "ordered map"). For clarity,
252-
the term "unordered map" may be used when the lack of an order is semantically
253-
important.
244+
:: A _map_ is a collection of entries, each of which has a key and value. Each
245+
entry has a unique key, and can be directly referenced by that key.
246+
247+
:: An _ordered map_ is a map which has a defined order. An entry added to an
248+
ordered map, which does not have an entry with that key, is ordered after
249+
existing entries.

spec/GraphQL.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,15 @@ algorithm step (e.g. "Let completedResult be the result of calling
8888
CompleteValue()") is to be interpreted as having at least the same level of
8989
requirement as the algorithm containing that step.
9090

91-
Conformance requirements expressed as algorithms can be fulfilled by an
92-
implementation of this specification in any way as long as the perceived result
93-
is equivalent. Algorithms described in this document are written to be easy to
94-
understand. Implementers are encouraged to include equivalent but optimized
95-
implementations. Similarly, data collections such as _list_, _set_ and _map_
96-
also introduce conformance requirements. Implementers are free to use
97-
alternative data collections as long as the perceived result remains equivalent.
91+
Conformance requirements expressed as algorithms and data collections can be
92+
fulfilled by an implementation of this specification in any way as long as the
93+
perceived result is equivalent. Algorithms described in this document are
94+
written to be easy to understand. Implementers are encouraged to include
95+
equivalent but optimized implementations.
9896

9997
See [Appendix A](#sec-Appendix-Notation-Conventions) for more details about the
100-
definition of algorithms and other notational conventions used in this document,
101-
and [Appendix A: Data Collections](#sec-Data-Collections) for specifics of data
102-
collections and their ordering.
98+
definition of algorithms, data collections, and other notational conventions
99+
used in this document.
103100

104101
**Non-Normative Portions**
105102

0 commit comments

Comments
 (0)