-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Editorial: Consistify prose for same-value properties #2575
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
Conversation
Within this PR, we are still inconsistent about whether we refer to just the property name ( |
I agree, but that inconsistency is much wider than the few spots addressed by this PR, so I was going to deal with it separately. In fact, I'll open an issue to start the discussion. |
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.
Should this also align the rest of the variants?
$ grep -o 'initial value of .* property' spec.html | \
sed 's/property.*/property/; s/[*]"[^*"]*"[*]/*"…"*/; s/@@[[:graph:]]*/@@…/' | \
sort | uniq -c
1 initial value of the async generator function's *"…"* property
1 initial value of the @@… data property
1 initial value of the function's `name` property
1 initial value of the function's *"…"* property
1 initial value of the generator function's *"…"* property
31 initial value of the @@… property
40 initial value of the *"…"* property
1 initial value of the %TypedArray%`.prototype.toString` data property
I'm thinking it would involve replacing «@@… data property
» with «@@… property
» and «function's `name` property
» with «function's *"name"* property
» (the other «[$type] function's *"…"* property
» patterns refer to prototype
initialization and seem fine to me).
spec.html
Outdated
@@ -47397,7 +47397,7 @@ <h1>Date.prototype.toGMTString ( )</h1> | |||
<emu-note> | |||
<p>The `toUTCString` method is preferred. The `toGMTString` method is provided principally for compatibility with old code.</p> | |||
</emu-note> | |||
<p>The function object that is the initial value of `Date.prototype.toGMTString` is the same function object that is the initial value of `Date.prototype.toUTCString`.</p> | |||
<p>The initial value of the `Date.prototype.toGMTString` property is %Date.prototype.toUTCString%, defined in <emu-xref href="#sec-date.prototype.toutcstring"></emu-xref>.</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.
<p>The initial value of the `Date.prototype.toGMTString` property is %Date.prototype.toUTCString%, defined in <emu-xref href="#sec-date.prototype.toutcstring"></emu-xref>.</p> | |
<p>The initial value of the *"toGMTString"* property is %Date.prototype.toUTCString%, defined in <emu-xref href="#sec-date.prototype.toutcstring"></emu-xref>.</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.
Whether to use the "full name" or just the property key is the same point that @michaelficarra brought up. Again, I'd like to defer that to a bigger PR (after some discussion about what's wanted).
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 in general, but in this specific case I think it makes sense to match the nearby sections right now (specifically the preceding String.prototype.trimLeft and String.prototype.trimRight, which this PR updates to «The initial value of the *"trim{Left,Right}"* property is…
»).
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 with @gibson042. While it's true that there's lots of other inconsistency remaining to be fixed, it is also true that as of this PR there are 44 uses of precise phrase "<p>The initial value of the X property", and of them only Number.parseFloat
, Number.parseInt
, %TypedArray%`.prototype.toString`
, and Date.prototype.toGMTString
are written out as full paths, and all of those uses are introduced by this PR. Seems best to just make those four consistent with the other uses of that phrase for the moment, and possibly change them all as part of #2576.
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.
Hm. Maybe I'll just pause this PR until #2576 makes some progress on question (1).
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.
Ehhh, I'd prefer to just land this, with the specific inconsistency mentioned above fixed, and then deal with #2576 later. I'm happy to push up a commit to this branch addressing the above comment if you'd prefer not to do it yourself.
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.
Nah, you wore me down. I'll push a commit.
spec.html
Outdated
@@ -39220,7 +39220,7 @@ <h1>%TypedArray%.prototype.toLocaleString ( [ _reserved1_ [ , _reserved2_ ] ] )< | |||
|
|||
<emu-clause id="sec-%typedarray%.prototype.tostring"> | |||
<h1>%TypedArray%.prototype.toString ( )</h1> | |||
<p>The initial value of the %TypedArray%`.prototype.toString` data property is the same built-in function object as the `Array.prototype.toString` method defined in <emu-xref href="#sec-array.prototype.tostring"></emu-xref>.</p> | |||
<p>The initial value of the %TypedArray%`.prototype.toString` property is %Array.prototype.toString%, defined in <emu-xref href="#sec-array.prototype.tostring"></emu-xref>.</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.
<p>The initial value of the %TypedArray%`.prototype.toString` property is %Array.prototype.toString%, defined in <emu-xref href="#sec-array.prototype.tostring"></emu-xref>.</p> | |
<p>The initial value of the *"toString"* property is %Array.prototype.toString%, defined in <emu-xref href="#sec-array.prototype.tostring"></emu-xref>.</p> |
The initial value of the *"toGMTString"* property is %Date.prototype.toUTCString%, defined in .
If by "this" you mean "this PR", then no, I intentionally made this PR very narrowly scoped. But yes, I'd like those variants to be made consistent, and I'll do the job if I can get a sense of how the editors would like things aligned. See Issue #2576.
Note that that doesn't find all variants, because some don't use the word "initial" and some don't use the word "value" and some don't use the word "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.
It's an improvement, and I'm looking forward to your PR that further refines this phrasing.
76ef273
to
12d1e95
Compare
Use consistent prose when the initial values of two intrinsic-properties are the same object. In the sentences affected by this PR, refer to properties by just the final property name rather than by "full paths". That is, change: - `Number.parseFloat` to *"parseFloat"* - `Number.parseInt` to *"parseInt"* - %TypedArray%`.prototype.toString` to *"toString"* - `Date.prototype.toGMTString` to *"toGMTString"* This increases consistency among sentences of this particular form. (But note that they're a small fraction of a large class of sentences being considered by issue tc39#2576, whose resolution could 'overturn' this choice, or other choices made in this PR)
12d1e95
to
e06c80c
Compare
Use consistent prose when the initial values of two intrinsic-properties are the same object.