Skip to content

Conversation

@jungwngkim
Copy link
Contributor

This PR reduces the following redundant expressions in spec.

For each cases, the line below is merged with above one.

# 1. `emu-meta` tag
<emu-meta *>{{ name }}</emu-meta>({{ args }})
<emu-meta *>{{ name }}({{ args }})</emu-meta>


# 2. Replace redundant verbs
as specified in <emu-xref href="*"></emu-xref>
as described in <emu-xref href="*"></emu-xref>


# 3. Remove redundant adverbs
{{ expr }} has a {{ field }}
{{ expr }} also has a {{ field }}

{{ expr }} does not have a {{ field }}
{{ expr }} does not already have a {{ field }}

1. Append {{ expr }} to {{ expr }}.
1. Append {{ expr }} to the end of {{ expr }}.

The merging is based on the number of each cases. Smaller cases are merged to larger ones.

$ grep '1\. .*</emu-meta>(' spec.html -c
102
$ grep '1\. .*)</emu-meta>' spec.html -c
39
$ grep '1\. .* as specified in <emu-xref' spec.html -c
19
$ grep '1\. .* as described in <emu-xref' spec.html -c
2
$ grep '1\. .* has a \[\[.*\.' spec.html -c
57
$ grep '1\. .* also has a \[\[.*\.' spec.html -c
1
$ grep '1\. .* does not have a .*\.' spec.html -c
17
$ grep '1\. .* does not already have a .*\.' spec.html -c
3
$ grep '1\. Append .* to .*\.' spec.html -c
138
$ grep '1\. Append .* to the end of .*\.' spec.html
1

For reference, the number of line diff is 46 = 39 + 2 + 1 + 3 + 1.

@bakkot bakkot added the request preview ask the bot to trigger a PR preview label Nov 24, 2025
@github-actions github-actions bot removed the request preview ask the bot to trigger a PR preview label Nov 24, 2025
@github-actions
Copy link

The rendered spec for this PR is available at https://tc39.es/ecma262/pr/3726.

@bergus
Copy link

bergus commented Nov 24, 2025

I disagree that these should generally be removed. While they may not make a technical difference, they help making the spec text easier to read; especially the adverbs have a meaning that convey an intention that would be otherwise be lost.

@jungwngkim
Copy link
Contributor Author

The reason I’m proposing this PR is to ensure that the same expression/step/condition has the same form.

If you believe that the meaning is not preserved in the merged forms above, it would be helpful to suggest a consistent format for that expression/step/condition.

Also, regarding the adverbs you mentioned, I want to make a reminder that those forms are used max. 3 times throughout the entire spec.

"also" and "already" do not add any additional meaning, and since there's already a "prepend" step corrensponding to "append" step, "the end of" is redundant in this context.

Copy link
Member

@michaelficarra michaelficarra left a comment

Choose a reason for hiding this comment

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

These all seem like improvements to me.

@bergus
Copy link

bergus commented Nov 24, 2025

To me, "does not already have x" implies "… but will now get x", which makes sense in those precondition-assertions. But sure, these few occurrences are not worth arguing over.

@bakkot
Copy link
Member

bakkot commented Nov 25, 2025

For the <emu-meta> tags, I think it makes more sense to consistently put the tags around the whole expression, since the effects arise from the whole expression not just the identifier. I think that should work fine with ecmarkup but can update it if not.

I don't like removing the "already"s. The technical meaning is the same either way but, like @bergus, I find it clearer and more natural to include the word in those cases. Unfortunately this is strictly a matter of English prose-writing, which is an aesthetic judgement, but nevertheless this is my opinion.

(The one "also" is in an awkward sentence anyway and so I am fine with dropping that particular instance.)

The removal of "to the end of" and changes from "described" to "specified" seem good.

@jungwngkim
Copy link
Contributor Author

Thanks for the feedback.

To summarize, should I submit a PR that wraps the tags around the whole expression and keeps 'already' as is?

@michaelficarra
Copy link
Member

@jungwngkim Please update this PR in that way.

@michaelficarra michaelficarra requested a review from a team December 5, 2025 01:12
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.

4 participants