-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Conversation
spec.html
Outdated
HexDigits[~Sep] [> but only if MV of |HexDigits| > 0x10FFFF] | ||
HexDigits[~Sep] [> but only if MV of |HexDigits| > 0x10FFFF] |
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.
this seems like something ecmarkup should be able to do - also there's another >
earlier in the line, would that need it too?
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.
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).
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.
Grammarkdown accepts [>
: rbuckton/grammarkdown#60
But it also accepts >
, in both places. I kind of prefer it to be >
but I recognize we're inconsistent.
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 I revert changes to this line then? emu-format isn't happy with the >
anyway.
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 just did it. The main goal here is to indicate use of -
rather than –
or −
.
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. |
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. |
@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. |
@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 . |
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. |
How would @tc39/ecma262-editors feel about providing an explicit list of numeric operators? It looks to me like there are only 10:
|
…tion `-` (U+002D HYPHEN-MINUS) rather than `−` (U+2212 MINUS SIGN) cf. tc39/ecma262#2730
…tion `-` (U+002D HYPHEN-MINUS) rather than `−` (U+2212 MINUS SIGN) cf. tc39/ecma262#2730
Escape>
as>
.-
(U+002D HYPHEN-MINUS) rather than e.g.–
(U+2013 EN DASH) or−
(U+2212 MINUS SIGN).Ref tc39/ecma402#672