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

consider renaming "floating literals" to "floating-point literals" #3165

Closed
zygoloid opened this issue Aug 9, 2019 · 6 comments · Fixed by #3168
Closed

consider renaming "floating literals" to "floating-point literals" #3165

zygoloid opened this issue Aug 9, 2019 · 6 comments · Fixed by #3168
Assignees

Comments

@zygoloid
Copy link
Member

zygoloid commented Aug 9, 2019

"Floating literals" do not float. They are literals of floating-point type, so we should call them "floating-point literals" instead. Survey of usage:

  • "floating literal" appears 17 times, including in two other defined terms (decimal floating literal and hexadecimal floating literal), plus one occurrence of "floating or integer literal", and we have three grammar productions floating-literal, decimal-floating-literal, and hexadecimal-floating-literal.
  • "floating-point literal" appears only in [time.duration.literals]p2 (and in the index).
  • "floating operands" and "floating expressions" appear in [expr.pre]p6 (those are meaningless and should just be fixed).
  • "floating type" does not appear anywhere.
  • "floating point type" appears 4 times (those should just be fixed; no need for more discussion on that).
  • an "entity is characterized [...] as floating" by [rand]/3.3; this simply seems wrong.
  • all other occurrences of "floating" are as part of the term "floating-point".

So other than bugs, "floating literal" is the only context in which we use "floating" not followed by "-point". We have a strong consistency argument to fix this.

@zygoloid zygoloid added cwg Issue must be reviewed by CWG. decision-required A decision of the editorial group (or the Project Editor) is required. labels Aug 9, 2019
@jensmaurer
Copy link
Member

I hasten to point out that we correctly (i.e. literally) quote the title of

ISO/IEC 10967-1:2012
Information technology -- Language independent arithmetic -- Part 1: Integer and floating point arithmetic

Should we clue them in that they forgot hyphenating the compound adjective?

@jensmaurer
Copy link
Member

The "obvious" bugfixes are subject of #3167.

@zygoloid
Copy link
Member Author

zygoloid commented Aug 9, 2019

Should we clue them in that they forgot hyphenating the compound adjective?

There is a trend in English towards omitting hyphens in compound adjectives when they are not necessary to disambiguate. (Note that "Language independent arithmetic" is also missing a hyphen that the prescriptivist hyphenation style would mandate.) I think we should just view this as a difference in house styles.

@jensmaurer
Copy link
Member

There is a trend in English ...

https://www.grammar-monster.com/lessons/hyphens_in_compound_adjectives.htm
says "In the UK, your readers will expect you to use hyphens in compound adjectives. In the US, your readers will be more lenient. Use a hyphen if it eliminates ambiguity or helps your reader. If you're unsure, use a hyphen."

In the above title, how do we know we're not talking about "integer point arithmetic and floating [on a lake of mercury?] point arithmetic" (as opposed to interval arithmetic)?
Similar to what we do with "its", in technical texts, it seems useful to rely on first-order English syntax rules to help inform the semantic meaning in all cases, instead of sometimes feeding back "obvious" semantic meaning to the first-order English parse. And that means: hyphens for compound adjectives, always.

@jensmaurer
Copy link
Member

Editorial teleconference: Give CWG an opportunity to veto.

@jensmaurer jensmaurer removed the decision-required A decision of the editorial group (or the Project Editor) is required. label Sep 9, 2019
@jensmaurer
Copy link
Member

CWG has seen the related pull request and was fine with it.

@jensmaurer jensmaurer removed the cwg Issue must be reviewed by CWG. label Sep 17, 2019
@jensmaurer jensmaurer self-assigned this Sep 18, 2019
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 a pull request may close this issue.

2 participants