-
Notifications
You must be signed in to change notification settings - Fork 535
Open
Labels
A-destructorsArea: destructors, droppingArea: destructors, droppingLanguage CleanupImprovements to existing language which is correct but not clear, or missing examples, or the like.Improvements to existing language which is correct but not clear, or missing examples, or the like.
Description
In #1037 a question came up about the exact wording around the introduction of the destructors chapter which says
When an initialized variable or temporary goes out of scope its destructor is run, or it is dropped.
The PR author interpreted the phrase dropped meaning a synonym for running the destructor. But I read it as two separate concepts:
- When any value goes out of scope, it is "dropped".
- If the value has a destructor, that destructor is run.
I don't think "dropping" and "running destructors" can be used interchangeably because not all values have a destructor. However, I am uncertain if that is correct, or if that is the best way to document these concepts. Either way, it would be good to clarify that a little.
younes-io
Metadata
Metadata
Assignees
Labels
A-destructorsArea: destructors, droppingArea: destructors, droppingLanguage CleanupImprovements to existing language which is correct but not clear, or missing examples, or the like.Improvements to existing language which is correct but not clear, or missing examples, or the like.