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

Avoid "requirement" as a grammar non-terminal #1671

Closed
hubert-reinterpretcast opened this issue Jul 18, 2017 · 5 comments
Closed

Avoid "requirement" as a grammar non-terminal #1671

hubert-reinterpretcast opened this issue Jul 18, 2017 · 5 comments

Comments

@hubert-reinterpretcast
Copy link
Contributor

P0734R0 contains requirement as a grammar non-terminal.
The Working Draft prior to integrating P0734R0 already uses "requirement" with another meaning.

In this case, it would presumably be less disruptive to change P0734R0 to avoid "requirement" as the name of a grammar non-terminal. req-stmt may be appropriate. Additionally, P0734R0 uses "requirement" to also refer to the semantics that the requirement non-terminal applies. These uses may be modified to refer instead to the "enforced properties of the req-stmt".

@jensmaurer
Copy link
Member

I agree with the general sentiment, but "enforced properties of the req-stmt" sounds contrived. Oh, and "req-stmt" is not really a statement, right?

@jensmaurer
Copy link
Member

The worst conflict is probably [structure.requirements].

@hubert-reinterpretcast
Copy link
Contributor Author

Yes, req-stmt is not really a statement. It does act very similarly to a static_assert-declaration though. So we could have requirement-declaration and "declared requirements".

@jensmaurer jensmaurer added this to the C++20 Concepts milestone Jul 18, 2017
@jensmaurer jensmaurer added the decision-required A decision of the editorial group (or the Project Editor) is required. label Oct 19, 2017
@zygoloid
Copy link
Member

zygoloid commented Nov 7, 2017

The grammar term requirement is used only in a very limited scope, and in the C++ wording (unlike C) we don't intend to have an implied correlation between grammar term foo and the English word "foo" used elsewhere in the text. As such, and because requirement is the most natural term for an element in a requires expression, I don't see sufficient motivation to make a change here.

@zygoloid zygoloid closed this as completed Nov 7, 2017
@zygoloid zygoloid removed the decision-required A decision of the editorial group (or the Project Editor) is required. label Nov 7, 2017
@hubert-reinterpretcast
Copy link
Contributor Author

The lack of the implied correlation is precisely what the second half of this issue points to. For example, see the unitalicized instances of "requirements" in 8.1.7 [expr.prim.req] paragraph 6.

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

No branches or pull requests

3 participants