Clarify the evaluation order for collection literal elements #2175
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.
The evaluation order for the elements of a collection literal (say,
[e1, ...e2, if (b) e3]
wheree2
is a set) was not mentioned. This PR adds a few words to clarify that evaluation occurs in textual order. The order of evaluation associated with the subsequences with other than a single element is already specified (e.g., the subsequence for aSet
spread is obtained by a pseudo-code for-in statement that explicitly states how each object is obtained).It also corrects a couple of typos where an empty sequence followed by a semicolon was shown as
[[;]]
rather than[[]];
. One more set of typos fixed:\ell
changed to\ell_1
, four locations, in spec of static analysis of<forElement>
.The wording around "object sequences" is not wonderful, but I'd recommend that we leave it as is for now.