Date: Wed, 12 Aug 2026 17:48:10 +0300
On 12 Aug 2026 17:21, Ville Voutilainen via Std-Proposals wrote:
> On Wed, 12 Aug 2026 at 17:05, Tiago Freire via Std-Proposals
> <std-proposals_at_[hidden]> wrote:
>>
>> For me I would mostly be interested in the const case.
>> Example in an awkward initialization scenario, where a variable should be const (for const hygiene) but can't because of conditions.
>> But I can also see full erasure being useful in the case of scopes locks if you need them to exist but should not be messed with unless by trivial behavior when going out of scope.
>> Although I have to admit that the full erasure has little applications.
>
> Thanks, good point,
>
> 4) poisoning a variable after a construction-laterassignment pair, so
> it can't be const, and can't be declared unnameable,
> but should be unnameable after it has been both created and
> post-creation set up to guard a scope
I think, deferred constification needs a proper solution that doesn't
require a dummy mutable variable used for initialization. But even then,
I would rather reuse the same name for the mutable variable and for the
constified variable. And redacting doesn't give that; compared to
undeclaration, it just grows the compiler context and reserves a name.
> On Wed, 12 Aug 2026 at 17:05, Tiago Freire via Std-Proposals
> <std-proposals_at_[hidden]> wrote:
>>
>> For me I would mostly be interested in the const case.
>> Example in an awkward initialization scenario, where a variable should be const (for const hygiene) but can't because of conditions.
>> But I can also see full erasure being useful in the case of scopes locks if you need them to exist but should not be messed with unless by trivial behavior when going out of scope.
>> Although I have to admit that the full erasure has little applications.
>
> Thanks, good point,
>
> 4) poisoning a variable after a construction-laterassignment pair, so
> it can't be const, and can't be declared unnameable,
> but should be unnameable after it has been both created and
> post-creation set up to guard a scope
I think, deferred constification needs a proper solution that doesn't
require a dummy mutable variable used for initialization. But even then,
I would rather reuse the same name for the mutable variable and for the
constified variable. And redacting doesn't give that; compared to
undeclaration, it just grows the compiler context and reserves a name.
Received on 2026-08-12 14:48:18
