-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: remove %Generator%
and %AsyncGenerator%
in favor of dotted forms
#2065
Conversation
I think we should keep the Also, this will need to be rebased on top of #2059. |
spec.html
Outdated
<li>is the value of the *"prototype"* property of %GeneratorFunction%.</li> | ||
<li>is the intrinsic object <dfn>%Generator%</dfn> (see Figure 2).</li> |
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.
I agree that it's redundant to say it's both:
- the initial value of the "prototype" property of %GeneratorFunction%, and
- the intrinsic object %GeneratorFunction.prototype%.
But I'm wondering why you chose to keep the first and remove the second, rather than vice versa. (We've established the %Foo.bar% notation, so why not use it here?)
Ditto the deletions under:
- "The AsyncGeneratorFunction prototype object"
- "The Generator Prototype Object"
- "The AsyncGenerator Prototype Object"
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.
%GeneratorFunction.prototype%
only works because the prototype
property is already defined; in other words, the first of those two is the one that's actually required. The second one isn't necessary, I suppose, but is nice for clarity.
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.
If the spec says "X is %Foo.bar%", then by definition, that means that if I were to access the 'bar' property of '%Foo% prior to any ECMAScript code being evaluated, I would get X. To me, this seems equivalent to saying that X is the initial value of the 'bar' property of %Foo%. You're saying these aren't equivalent?
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.
@jmdyck i'm saying that relying on that kind of inference isn't something I'd prefer; %Foo.bar%
works because it's the initial value of bar
on Foo
, which imo should have to be defined somewhere.
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.
Isn't 25.2.2.2 Generator.prototype enough of a definition?
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.
25.2.2.2 there doesn't actually have an explicit link that I can see to 25.2.3, "the GeneratorFunction prototype object"; 25.2.3 has "is the value of the "prototype" property of %GeneratorFunction%." which is the link.
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.
I'm confused, so I'll back up. Earlier, I asserted the equivalence of the two statements:
- X is %Foo.bar%
- X is the initial value of the
bar
property of %Foo%.
You didn't deny that they were equivalent, but you said that the first relies on a kind of inference (on the part of the reader, presumably) that you didn't prefer. I don't really understand that, but I can probably accept it as an editorial preference.
So, to clarify the specifics of this preference, 2 questions:
-
Would it make a difference for you if the statement were the other way round:
%Foo.bar% is X
? -
Do you expect to eventually remove all statements of the form
The initial value of `Foo.prototype` is %Foo.prototype%.
, or do any of them serve a purpose?
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.
I'm saying that they're not equivalent unless the second one exists.
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.
To clarify, when you say "the second one exists", do you mean "somewhere in the spec establishes that %Foo% has a bar
property"?
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.
Something that establishes that Foo has a bar property, and that the value of that property is "the object in question" (ie, "the Array prototype object", or whatever)
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.
Based on your suggestion in #2059 (comment), the wording:
<li>is the initial value of the *"bar"* property of %Foo%.</li>
Is redundant and should be replaced with the simpler:
<li>is <dfn>%Foo.bar%</dfn>.</li>
Which has the added bonus of supporting auto‑linking for the dotted intrinsics.
Yes; but this PR shouldn't be updated to that wording until #2059 lands. |
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 wasn’t rebased correctly.
See also:
P.S.: Please keep the emu‑xref
in the definition of the Generator Function Prototype Object:
(See <emu-xref href="#figure-2"/>)
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.
updated
This change seems to increase verbosity and make it harder to tell what the spec is talking about. What is the motivation? |
@littledan overall, the editors decided that we should only have one preferred way to refer to every intrinsic, and that the shortest (and dotted, when applicable) form would be preferred. Regarding |
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 PR leaves dangling references...
- to
%Generator%
inProperties of the GeneratorFunction Prototype Object
, and - to
%AsyncGenerator%
inProperties of the AsyncGeneratorFunction Prototype Object
.
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 doesn’t currently preserve auto‑linking for %GeneratorFunction.prototype .prototype%
and %AsyncGeneratorFunction .prototype.prototype%
.
See also:
I'm not convinced we want to preserve auto-linking for something that's not actually a well-known intrinsic anymore. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Now that #1948 has consensus and has been merged, this PR is no longer normative. |
@littledan I am personally in favor of this change because I cannot for the life of me keep track of which is |
spec.html
Outdated
@@ -26311,7 +26271,7 @@ <h1>Object.preventExtensions ( _O_ )</h1> | |||
|
|||
<emu-clause id="sec-object.prototype"> | |||
<h1>Object.prototype</h1> | |||
<p>The initial value of `Object.prototype` is %Object.prototype%.</p> | |||
<p>The initial value of `Object.prototype` is the Object prototype object.</p> |
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 and many of the subsequent changes seem unrelated to this PR; is this a rebase conflict? If it's intentional, I'd ask that these changes go into their own PR.
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.
It was intentional to make everything consistent. I can pull them out into another PR tho.
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.
I believe that it should probably be done in its own PR/commit.
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.
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.
Changes look okay to me.
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.
For consistency with current definitions, the <dfn>
for the intrinsic name should come before “is an ordinary object”.
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.
@ExE-Boss the editorial convention is established by this PR; removing the legacy ones entirely is a cleanup step after that's resolved. |
Fixes #2023.
#2056 will need to be rebased after this lands.