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: Stylize strings as values. #396

Merged
merged 2 commits into from
Dec 20, 2019

Conversation

spectranaut
Copy link

This follows the convention set in ECMA-262 to format strings as literals (*"string*" instead of `"string"`, see PR: tc39/ecma262#1733) and closes #54.

There is also one commit that adds a link in 5. Notational Conventions to ECMA-262.

While reviewing, consider the following conventions from ECMA-262 that I'm not positive apply here:

  • Tilde for spec-interal values: I couldn't find an example of a spec internal value in ECMA-402 that is not also a string specified somewhere else, such as the IANA Time Zone Database or Unicode. Because the string is not an internal arbitrary value it doesn't seem like we should use ~.
  • Notation for code points: I don't have an opinion on whether we should stylize characters the way ECMA-262 now stylizing code points, I'm curious if others do.

Copy link
Member

@rkirsling rkirsling left a comment

Choose a reason for hiding this comment

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

Woot! I'm so jealous that 402 is a multi-file spec. 😄

</p>

<p>
EXAMPLES `"ß"` (U+00DF) must not match or be mapped to `"SS"` (U+0053, U+0053). `"ı"` (U+0131) must not match or be mapped to `"I"` (U+0049).
EXAMPLES *"ß"* (U+00DF) must not match or be mapped to *"SS"* (U+0053, U+0053). *"ı"* (U+0131) must not match or be mapped to *"I"* (U+0049).
Copy link
Member

Choose a reason for hiding this comment

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

The only concern I see is that we may wish to change cases like *"ß"* (U+00DF) to `ß` (U+00DF) throughout this file, in alignment with, say, Note 4 of 21.2.2.8.2 in 262.

I don't have a strong opinion on this though, particularly since we're referring to these as "characters". (@jmdyck, what do you think?)

Copy link

Choose a reason for hiding this comment

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

It seems to me that it's incorrect for the preceding para to talk about ES String values as if they consist of Unicode code points.

Copy link
Member

Choose a reason for hiding this comment

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

I believe this can be done through a separate patch if necessary.

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.

All string literals must be code formatted
4 participants