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: Remove a paragraph for the length property of String.prototype.localeCompare #847

Merged
merged 1 commit into from
Dec 15, 2023

Conversation

arai-a
Copy link
Contributor

@arai-a arai-a commented Dec 15, 2023

This style follows other "length" properties in this spec and the ECMAScript spec.

@@ -32,7 +32,7 @@ <h1>String.prototype.localeCompare ( _that_ [ , _locales_ [ , _options_ ] ] )</h
</emu-alg>

<p>
The value of the *"length"* property of the `localeCompare` method is 1.
The value of the *"length"* property of the `localeCompare` method is *1*<sub>𝔽</sub>.
Copy link
Contributor

Choose a reason for hiding this comment

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

Even more consistency:

Suggested change
The value of the *"length"* property of the `localeCompare` method is *1*<sub>𝔽</sub>.
The *"length"* property of the `localeCompare` method is *1*<sub>𝔽</sub>.

But actually, it shouldn't even be necessary at all because the length of String.prototype.localeCompare ( that [ , locales [ , options ] ] ) is already 1 per ECMAScript Standard Built-in Objects:

Every built-in function object, including constructors, has a "length" property whose value is a non-negative integral Number. Unless otherwise specified, this value is the number of required parameters shown in the subclause heading for the function description. Optional parameters and rest parameters are not included in the parameter count.

Suggested change
The value of the *"length"* property of the `localeCompare` method is *1*<sub>𝔽</sub>.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks!
Indeed, the paragraph isn't necessary.
Updated the PR to just remove the paragraph.

@arai-a arai-a force-pushed the localeCompare-length branch from 105e73b to 6bd493c Compare December 15, 2023 06:19
@arai-a arai-a changed the title Editorial: Add 𝔽 subscript for the length of String.prototype.localeCompare Editorial: Remove a paragraph for the length property of String.prototype.localeCompare Dec 15, 2023
@gibson042 gibson042 merged commit 494be7a into tc39:master Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants