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

[lex.phases],[forward.list.ops],[list.ops],[alg.unique] Hyphenate non-empty #6487

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Eisenwave
Copy link
Contributor

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
Contributor 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.

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.

None yet

3 participants