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: Insert "the" before SDO-names #3309
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great!
At the editor call, we decided we'd rather add a metadata field to SDOs so we can choose on a per-SDO basis whether the invocation should use "the". This will also allow tooling to ensure that the proper calling convention is used (and potentially automatically fix it). We'll then review each SDO and decide wether is should have "the" or not. |
Okay, here's some data for your review. In practice, an SDO name is either:
In the first two cases, it wouldn't make grammatical sense to put "the" before the SDO name (and the spec doesn't). So I'll only consider the last case, where it's at least grammatically plausible. But in the subcase that the SDO returns a completion record, its invocations will typically be prefixed with That leaves SDOs with noun-phrase names that don't return a completion record. In the current spec, there are 45 such, and most of them (26) have at least one invocation with "the". Here's a list of them. Each line starts with the number of invocations (in the status quo) that have "the", and the number that don't. I also included each SDO's return-type (and sorted by that), in case that affects your decision as to whether the SDO should have "the" or not.
|
@bakkot Would invocations of one of these SDOs as a parameter of an AO still follow the "the" rule we define for it, or will we make an exception for that form? |
I'm inclined to make an exception for invocations of SDOs which are parameters of AOs or preceded by |
I think there's only one such case using "the" in the status quo:
(So in the eventual version of this PR, there might be just that one "the" removed, and lots added.) |
I've added a fixup to implement the following convention, so you can decide if that's what you want. In an SDO-invocation, use "the" before the SDO name iff:
|
For a case like
I'd be inclined to introduce an alias for the argument:
(whether or not there's a "the" before the SDO names). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. We should go through active open PRs and update them so they don't re-introduce inconsistencies while we wait for tooling to get updated.
(force-pushed to squash to one commit) |
... according to the new convention. Also, change: - "the result of TemplateStrings ..." to "the TemplateStrings ..." - "the result of evaluating StringValue ..." to "the StringValue ..."
E.g., change:
to:
This PR is divided into 4 commits, depending on:
since those are factors that might conceivably affect how you feel about the removal.
For the origin of this PR, see the discussion at #3210 (comment) and following (re
the second "the"
).Personally, I've got mixed feelings about this PR: I like the consistification, but I think the status quo is slightly easier to read. One possibility would be to include "The" in the name of some SDOs, e.g.
Another possibility would be use a more punctuation-based syntax for SDO invocations (e.g.,
from https://github.com/bterlson/ecma262/pull/3/files). It isn't necessarily easier to read, but the syntax signals that it should be read more like a programming language (as with AO invocations).