Skip to content

Conversation

@eisenwave
Copy link
Member

No description provided.

Copy link
Member

@jensmaurer jensmaurer left a comment

Choose a reason for hiding this comment

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

Hm... The wiki says we want to use "nonempty" for sets that are not empty:

https://github.com/cplusplus/draft/wiki/Specification-Style-Guidelines#hyphens-nonx-vs-non-x

(We don't have empty classes anymore, I think; the term is gone.)

It feels to me that a range that has no elements would be an "empty set", and thus "nonempty range" and "nonempty list" would be correct.

@tkoeppe , @zygoloid (as the author of the hyphenation rule): What do you think?

@eisenwave
Copy link
Member Author

eisenwave commented Aug 21, 2023

Hm... The wiki says we want to use "nonempty" for sets that are not empty:

I haven't noticed that rule when making my edit. It's surprising to me, because there are 18 uses of non-empty in the standard, and only 5 uses of nonempty, so I thought of it as an obvious inconsistency that can be fixed. You can even find two occurrences of non-empty set.

Empty is also a C++ term for strings at least, defined in [byte.strings], so doesn't it arguably fall under the first bullet in the wiki? At least it should for the change in [lex.phases] I've made.

The wiki also mentions nonempty as an example of a well-established non-hyphenated form. However, Google Trends suggests that non-empty is significantly more common, and I can't find any authoritative source that recommends nonempty. Overall, non-empty is more popular in the C++ standard and elsewhere.

Maybe the wiki should be updated, since its recommendation doesn't match common practice in the standard, or common practice elsewhere.

@JohelEGP
Copy link
Contributor

#440 was reopened for this.

@wg21bot wg21bot added the needs rebase The pull request needs a git rebase to resolve merge conflicts. label Dec 19, 2024
@lorihughes
Copy link

I was asked to chime in on this thread. Chicago Manual of Style omits the hyphen for prefixes most of the time. (We still include the hyphen when the characters are repeated, e.g., non-negative, or when necessary for clarity.) I double-checked several other popular style guides for their take: Butcher's Copy-Editing, New Oxford Style Manual, AP Stylebook, NYT Manual of Style and Usage, Dreyer's English. All agree that the hyphen should be omitted for nonempty.

@jensmaurer
Copy link
Member

@lorihughes , thanks for your input here!

Side note: Hyphenation seems to be one of areas where US and British English sometimes differ, and Germans usually get exposed to British English at school. Also, technical texts possibly prefer hyphenation in some cases for visual clarity.

For me, it's "nonempty", and we should fix the offenders in the wording.

@jensmaurer jensmaurer added the decision-required A decision of the editorial group (or the Project Editor) is required. label Jan 21, 2025
@lorihughes
Copy link

@lorihughes , thanks for your input here!

Side note: Hyphenation seems to be one of areas where US and British English sometimes differ, and Germans usually get exposed to British English at school. Also, technical texts possibly prefer hyphenation in some cases for visual clarity.

For me, it's "nonempty", and we should fix the offenders in the wording.

You're welcome!
Re the US/UK difference, that's why I consulted Oxford and Butcher's; those are both UK sources.

@tkoeppe
Copy link
Contributor

tkoeppe commented Feb 11, 2025

Editorial meeting February 2025: Jens's representation in #6487 (review) of our wiki rule is on point. There are different contexts, and all the proposed changes concern the natural language meaning of "nonempty", which both our wiki rule and the style guide that @lorihughes cited say should use the unhyphenated form. The status quo (and our rule) seem to be good as is.

@tkoeppe tkoeppe closed this Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

decision-required A decision of the editorial group (or the Project Editor) is required. needs rebase The pull request needs a git rebase to resolve merge conflicts.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants