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

[basic.pre] unintended re-definition of declaration #6753

Open
h0nzZik opened this issue Dec 29, 2023 · 2 comments
Open

[basic.pre] unintended re-definition of declaration #6753

h0nzZik opened this issue Dec 29, 2023 · 2 comments

Comments

@h0nzZik
Copy link

h0nzZik commented Dec 29, 2023

It seems to me that 6.1.5 is formulated in a way that suggest that the sentence is actually a definition of declaration - and it is not:

Every name is introduced by a declaration, which is a [...]

According my interpretation of this Grammarly blog post, the ", which is a [...]" part is a nonrestrictive clause. That means that the sentence should make sense even without it, and the clause should only add some additional information. So the sentence is equivalent to saying

Every name is introduced by a declaration. By the way, a declaration is a [...]

But then (1) we would have two definitions of what a declaration is, and (2) we would not restrict which kinds of declarations can introduce names. This would be in contrast with what I am guessing is the intended meaning of the sentence - that is, to define the "can-introduce-a-name" property of declaration. In my opinion, the sentence should go like this:

Every name is introduced by a declaration that is a [...]

(that is, we should use a restrictive clause).

Disclaimer: I am not a native English speaker.

@frederick-vs-ja
Copy link
Contributor

I think the italic style is making the paragraph a complete definition. IMO the Standardese is somehow different from the plain English.

@h0nzZik
Copy link
Author

h0nzZik commented Jan 3, 2024

Ok, so whenever after 6.1.5 I see "declaration", it refers to this list in 6.1.5, and when I see "declaration", it refers to the grammar element? Usually grammar elements ("syntactic objects") are distinguished from other terms ("semantics objects") in that they use dashes/hyphens if they consist of multiple words, while the other terms use spaces - but "declaration" is only one word, so that is confusing.

Also, the following suggests that there is a term "declaration of E" (for an entity E), but such a term is not defined anywhere.

An entity E is denoted by the name (if any) that is introduced by a declaration of E or [...]

The same sentence suggests ("the name (if any)") that a "declaration of E" has associated an optional name. But the, 6.6.2 says

A declaration may (re)introduce one or more names and/or entities into a translation unit.

Which could be interpreted in two ways: either there are two terms, a "declaration" and a "declaration of E", and that would be ok. Or there is only one term, and then two cited sentences together imply that a declaration introduces exactly one name, in a weird way.

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

2 participants