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: Improve consistency of mathematical conventions #2730

Closed

Conversation

gibson042
Copy link
Contributor

@gibson042 gibson042 commented Apr 11, 2022

  • Escape > as >.
  • Make clear that the symbol used for mathematical subtraction is - (U+002D HYPHEN-MINUS) rather than e.g. (U+2013 EN DASH) or (U+2212 MINUS SIGN).

Ref tc39/ecma402#672

spec.html Outdated
HexDigits[~Sep] [> but only if MV of |HexDigits| > 0x10FFFF]
HexDigits[~Sep] [> but only if MV of |HexDigits| > 0x10FFFF]
Copy link
Member

Choose a reason for hiding this comment

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

this seems like something ecmarkup should be able to do - also there's another > earlier in the line, would that need it too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this seems like something ecmarkup should be able to do

It seems to already be handled for output, but this corrects the existing source inconsistency w.r.t. [> but only if … ≤ …] as observable three lines down. Extension to linting and/or formatting would make sense.

also there's another > earlier in the line, would that need it too?

No, because literal [> …] is grammarkdown prose assertion syntax (and is converted to <emu-gmod>…</emu-gmod> on output).

Copy link
Contributor

Choose a reason for hiding this comment

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

Grammarkdown accepts [&gt;: rbuckton/grammarkdown#60

But it also accepts >, in both places. I kind of prefer it to be > but I recognize we're inconsistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I revert changes to this line then? emu-format isn't happy with the &gt; anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just did it. The main goal here is to indicate use of - rather than or .

@michaelficarra
Copy link
Member

Editors don't think this is an improvement. This list is not meant to be exhaustive. The closer we make this list to exhaustive, the more likely it is that readers will come to the incorrect conclusion that it is. So an obvious omission like this one helps, if anything.

@gibson042
Copy link
Contributor Author

Hmm, where is the exhaustive list? If it is defined by IEEE 754 then I think we have a different problem because that spec does use U+2212 rather than U+002D.

@michaelficarra
Copy link
Member

@gibson042 I don't think it's useful to try to explore that unless you think there's a usage in the spec of an arithmetic operator that you think might be unclear to some reader.

@gibson042 gibson042 closed this Apr 22, 2022
@gibson042
Copy link
Contributor Author

@michaelficarra It's about consistency rather than confusion. Subtraction can plausibly be represented by either "-" or "−", multiplication by "*" or "×", division by "/" or "÷", etc. I don't think we want a free mixture, but there's no documentation of which option is correct other than "look around", and that clearly didn't work for ECMA-402 as evidenced by tc39/ecma402@a50498d .

@michaelficarra
Copy link
Member

There are many places where we are consistent without documenting our editorial convention within the spec. This section is not meant to document an editorial convention but to explain a general notational convention.

@gibson042
Copy link
Contributor Author

How would @tc39/ecma262-editors feel about providing an explicit list of numeric operators? It looks to me like there are only 10:

  • +
  • -
  • ×
  • /
  • =
  • <
  • >

gibson042 added a commit to gibson042/proposal-temporal that referenced this pull request Apr 28, 2022
…tion

`-` (U+002D HYPHEN-MINUS) rather than `−` (U+2212 MINUS SIGN)
cf. tc39/ecma262#2730
ptomato pushed a commit to tc39/proposal-temporal that referenced this pull request Apr 29, 2022
…tion

`-` (U+002D HYPHEN-MINUS) rather than `−` (U+2212 MINUS SIGN)
cf. tc39/ecma262#2730
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.

4 participants