-
Notifications
You must be signed in to change notification settings - Fork 552
Destructors: Reword introduction of terms "destructor" and "dropped" #2034
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: master
Are you sure you want to change the base?
Destructors: Reword introduction of terms "destructor" and "dropped" #2034
Conversation
Avoid implying a difference between the two. The existing wording could be read as "either its destructor is run or it is dropped", implying a difference.
[scope](#drop-scopes), it is *dropped*, which means its *destructor* is run. | ||
(The two terms are used interchangeably here.) |
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.
dropped and destructor aren't the two terms used interchangeably. (We use the emphasis to define terms, so what's under emphasis matters here.) While extending the emphasis on the latter to include "is run" would be one option, that reads strangely to me still, so maybe there are other options here.
It'd seem better to me if we could find a factoring that avoided this parenthetical. This is just an introduction. Maybe something like reversing the terms back to the original order and saying something like "When a value or temporary goes out of scope and its destructor is run, we say that it has been dropped."
(I'm happy to make the revision here if something along these lines sounds OK to you.)
(This assumes that we want to treat these as equated, which as I mentioned in private communication, is probably not how this is meant currently.)
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.
I'm fine with this PR having flagged the underlying issue; feel free to edit and merge, as I'm not attached to the exact wording here and I'm not currently building anything further atop this.
We have issue #1078 for this. As what came up before, I still think that dropping and running a destructor are not the same thing. The wording could certainly be clarified, but I think it would be good for us to first come to an agreement what terminology we want to use. |
I'm talking with Josh separately, and this was my read as well that the existing text meant to distinguish these rather than to equate them. We should at a minimum remove the comma there, since that makes it seem like the clause is non-restrictive when it's meant restrictively -- i.e. it can't be dropped without changing the meaning of the sentence. |
☔ The latest upstream changes (possibly 8efb980) made this pull request unmergeable. Please resolve the merge conflicts. |
Avoid implying a difference between the two. The existing wording could
be read as "either its destructor is run or it is dropped", implying a
difference.