-
Notifications
You must be signed in to change notification settings - Fork 777
Replace the uses of "local variable" with "[block] variable with automatic storage duration" #7307
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
base: main
Are you sure you want to change the base?
Replace the uses of "local variable" with "[block] variable with automatic storage duration" #7307
Conversation
I would prefer to replace the remaining uses of "local variable" with "[block] variable with automatic storage duration" for consistency, instead of reintroducing a term that CWG agreed to abolish. |
7f6c286
to
66480e7
Compare
Thanks. I'm now switching to this direction. |
They are not equivalent. The term "local variable" has nothing to do with the storage duration at all, it is now just "block variable", not necessarily "with automatic storage duration"; although most use cases apparently imply this. And personally I don't like too many occurence of the lengthy "with automatic storage duration" phrase when the storage duration is contextually clear enough. |
66480e7
to
50cb8b2
Compare
@FrankHB , works for me; I haven't looked at the details. If we mean "block variable", we should say so. If we mean "with automatic storage duration", we also should say so. |
Replace the uses of "local variable" with "[block] variable with automatic storage duration". Sometimes the automatic storage duration" can be inferred from the context.
50cb8b2
to
bb77bca
Compare
Yeah. I wish it's clear enough to suppose the automatic storage duration can be implied by not using |
- Use "initializes variables with automatic storage duration" in [text]. - Drop some adjectives in [except.ctor].
Looks good, thanks! @jwakely could you have a quick look at the iostreams wording? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Being this precise about the storage duration of hypothetical local variables used within locale facets seems unnecessary to me (is anybody going to interpret that wording as saying they should have static storage duration?!), but whatever, it's fine.
Well, the main point is to get rid of the term "local". The proposed wording avoids any future complaints about potential ambiguity. In the non-normative examples we have indeed just dropped all qualifications, since it's clear from context what we mean, but in the normative wording it's perhaps worth being precise even if it's obvious. |
Understood, I just think using "variables" in the locale wording would have been fine. That wording has bigger problems! |
But I'm not suggesting a change - as you say, being explicit avoids potential future requests for clarification. |
Right... if you think the wording would be completely fine and beyond future reproach, I'd be happy to consider dropping the qualifications, but spelling it out seems a bit safer, since it would otherwise be open to questions (e.g. "Can the sentry be static? That's faster."). |
@frederick-vs-ja: would you mind digging up the affected subclause stable labels? |
P1787R6 dropped the previous buggy uses and definition of term local variable. But there're many remaining use of local variable.
This PR removes the remaining occurences except for one "conceptual local variable" in a comment (which seems OK to me as we're not talking about real local variable).
Fixes #6617.