Date: Wed, 12 Aug 2026 00:13:53 +0200
On 2026-08-11 21:43, Ville Voutilainen via Std-Proposals wrote:
> On Tue, 11 Aug 2026 at 22:29, Andrey Semashev via Std-Proposals
> <std-proposals_at_[hidden]> wrote:
>> On 11 Aug 2026 22:12, Ville Voutilainen via Std-Proposals wrote:
>>> On Tue, 11 Aug 2026 at 22:11, Henry Skoglund via Std-Proposals
>>> <std-proposals_at_[hidden]> wrote:
>>>> On 2026-08-11 21:05, Simon Schröder wrote:
>>>>> This reminds me (in case you are continuing with the proposal): You should discuss if once a variable has been poisoned, if the same name can be reused for a different variable.
>>>> Hi, once poisoned I think it should not be allowed to be reused. I.e.
>>>> issue a compiler error like:
>>>> double raw;
>>>> forget raw;
>>>> int raw; // <--- error: raw is forgotten and cannot be resurrected
>>> Exactly. Make name lookup still find the name, but make it an error to
>>> find a poisoned name.
>> Then "forget" is not the right word, since the name is clearly not
>> forgotten.
> Sure, agreed.
Yeah the compiler needs to remember it, since the destructor still have
to run in the same place (end of scope, as if there was no forget
statement).
So "forget" is indeed a bit of a misnomer, I was toying with other verbs
like "begone", "perish", "ban". But "forget" kind of nails it anyway :-)
> On Tue, 11 Aug 2026 at 22:29, Andrey Semashev via Std-Proposals
> <std-proposals_at_[hidden]> wrote:
>> On 11 Aug 2026 22:12, Ville Voutilainen via Std-Proposals wrote:
>>> On Tue, 11 Aug 2026 at 22:11, Henry Skoglund via Std-Proposals
>>> <std-proposals_at_[hidden]> wrote:
>>>> On 2026-08-11 21:05, Simon Schröder wrote:
>>>>> This reminds me (in case you are continuing with the proposal): You should discuss if once a variable has been poisoned, if the same name can be reused for a different variable.
>>>> Hi, once poisoned I think it should not be allowed to be reused. I.e.
>>>> issue a compiler error like:
>>>> double raw;
>>>> forget raw;
>>>> int raw; // <--- error: raw is forgotten and cannot be resurrected
>>> Exactly. Make name lookup still find the name, but make it an error to
>>> find a poisoned name.
>> Then "forget" is not the right word, since the name is clearly not
>> forgotten.
> Sure, agreed.
Yeah the compiler needs to remember it, since the destructor still have
to run in the same place (end of scope, as if there was no forget
statement).
So "forget" is indeed a bit of a misnomer, I was toying with other verbs
like "begone", "perish", "ban". But "forget" kind of nails it anyway :-)
Received on 2026-08-11 22:14:00
