C++ Logo

std-proposals

Advanced search

Re: [std-proposals] A new C++ keyword: forget

From: Henry Skoglund <henry_at_[hidden]>
Date: Wed, 12 Aug 2026 00:41:22 +0200
On 2026-08-12 00:33, Ville Voutilainen wrote:
> On Wed, 12 Aug 2026 at 01:29, Henry Skoglund <henry_at_[hidden]> wrote:
>
>> Good idea with a std:: prefix, avoids breaking someone's code that has a
>> type called "forget".
> Bingo. :)
>
>> What about std::redact()?
> I quite like it. After you redact a name, code that follows it
> considers the declaration of the name
> as having been redacted, and can't name or redeclare the thing. The
> name's earlier declaration
> is there for cleanup purposes, but for post-redaction naming purposes,
> it's just sharpied all over.
>
> Maybe even better names exist, but that's a very explicable analogy,
> if you ask me.

Perhaps I should make a new post with std::redact() as the new suggestion.

What do you think about redacting types, namespaces and functions? Is
that something to leave for a future exercise, i.e. for now you will
only be able to redact variables?

Received on 2026-08-11 22:41:29