Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorial: normalisation around List construction #2142

Merged
merged 2 commits into from
Oct 9, 2020
Merged

Conversation

michaelficarra
Copy link
Member

No description provided.

@michaelficarra michaelficarra requested a review from a team August 18, 2020 22:32
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated
@@ -32600,11 +32600,11 @@ <h1>Atom</h1>
1. Let _ye_ be _y_'s _endIndex_.
1. If _direction_ is equal to +1, then
1. Assert: _xe_ &le; _ye_.
1. Let _s_ be a new List whose elements are the characters of _Input_ at indices _xe_ (inclusive) through _ye_ (exclusive).
1. Let _s_ be a List whose elements are the characters of _Input_ at indices _xe_ (inclusive) through _ye_ (exclusive).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Let _s_ be a List whose elements are the characters of _Input_ at indices _xe_ (inclusive) through _ye_ (exclusive).
1. Let _s_ be a List containing the characters of _Input_ at indices _xe_ (inclusive) through _ye_ (exclusive).

Or perhaps better, replace all the potentially ambiguous "List containing..." text with "List whose elements are...".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we should try to normalise that phrasing everywhere?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I do.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I can do that as a follow-up PR. I also prefer "whose elements are".

@michaelficarra michaelficarra force-pushed the be-a-new-list branch 2 times, most recently from ebbf3ab to d8902ff Compare August 21, 2020 15:56
@bakkot
Copy link
Contributor

bakkot commented Aug 23, 2020

There's still 29 uses of "a new List". I see those are all single-item lists. Did you intentionally skip those?

For single-element lists, we use all of:

  • "a new List containing _x_"
  • "a List containing _x_"
  • "a List containing only _x_"
  • "a List containing the one element which is _x_"
  • "a List containing the single element, _x_".

I would like those to get normalized as well, though I guess it need not be in this PR. My preference for these cases is to say "a List whose sole element is _x_", to match "a List whose elements are".

@jmdyck
Copy link
Collaborator

jmdyck commented Aug 24, 2020

For single-element lists, there's also one occurrence of:

  • a List whose sole item is _arg_

(Note "item" not "element".)

@michaelficarra
Copy link
Member Author

@bakkot There's also hundreds of list literals using double angle brackets.

Let methodNames be « "toString", "valueOf" ».

We can address this inconsistency in a follow-up PR.

spec.html Show resolved Hide resolved
@ljharb ljharb requested review from syg, bakkot and a team October 8, 2020 22:01
@ljharb ljharb self-assigned this Oct 8, 2020
@ljharb ljharb merged commit 5b76931 into master Oct 9, 2020
@ljharb ljharb deleted the be-a-new-list branch October 9, 2020 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants