Date: Tue, 17 Nov 2026 12:45:02 +0100
This is mostly too late for C++ to introduce new keywords that are not obfuscated. We now have things like co_yield, co_return, and contract_assert. If we want to have this feature, the new keyword will not be the optimal choice. I would expect that something like ‘again’ would most likely not collide with existing variable names.
> On 17. Nov 2026, at 11:37, Sebastian Wittmeier via Std-Proposals <std-proposals_at_[hidden]> wrote:
>
> The explicit motto of Larry Wall, inventor of Perl and Raku, is TIMTOWTDI - There Is More Than One Way To Do It.
> His nickname is Tim Toady.
> So it is a philosophical design choice to have everything be expressed like spoken language (instead of being obfuscated ;-) like in other languages).
>
>
> -----Ursprüngliche Nachricht-----
> Von: "Dr. Simon Schröder" <dr.simon.schroeder_at_[hidden] <mailto:dr.simon.schroeder_at_[hidden]>>
> Gesendet: Di 17.11.2026 11:28
> Betreff: Re: [std-proposals] Discussion: A proposed repeat statement for C++
> An: std-proposals_at_[hidden] <mailto:std-proposals_at_[hidden]>;
> CC: Sebastian Wittmeier <wittmeier_at_[hidden] <mailto:wittmeier_at_[hidden]>>;
> That’s good to know that other languages have this. The use cases I could find for Ruby were input validation or retrying a failed operation (e.g. network access).
>
> However, I would certainly just write a nested loop (maybe the inner loop in a separate function) with the inner loop being a ‘while’ or ‘do-while’ loop. This would clearly show which part I am retrying and we would have kind of a “single responsibility” for each loop. I would request a real world example where this clearly improves the code and does not mix two tasks in one loop if this should go towards a proposal. (Though this is just my personal opinion and I don’t have any power to influence this.)
>
>> On 17. Nov 2026, at 10:41, Sebastian Wittmeier via Std-Proposals <std-proposals_at_[hidden]> wrote:
>>
>> Raku, Ruby, and Perl have a redo instruction to do it as you stated.
>>
>> https://docs.raku.org/language/control?utm_source=chatgpt.com#Control_flow
>>
>> -----Ursprüngliche Nachricht-----
>> Von: scbd Gm via Std-Proposals <std-proposals_at_[hidden]>
>> Gesendet: Mo 16.11.2026 17:41
>> Betreff: [std-proposals] Discussion: A proposed repeat statement for C++
>> An: std-proposals_at_[hidden];
>> CC: scbd Gm <scnd2908gm_at_[hidden]>;
>> Hello everyone,
>> I'm interested in proposing a new C++ control-flow statement called repeat.
>> The motivation is to provide a dedicated way to restart the current loop iteration immediately, without executing the remaining statements or the loop's increment expression.
>> For example:
>> int x = 0; for (int i = 0; i < 5; i++) { x++; cout << "Hello\n"; if (x != 2) repeat; }
>> My proposed semantics are:
>> Restart the innermost enclosing loop body.
>> Skip the remaining statements of the current iteration.
>> Do not execute the loop's increment expression.
>> Destroy and reinitialize local objects belonging to the loop body's scope.
>> Preserve variables declared outside the loop body.
>> Support for, while, and do-while loops.
>> I believe this could provide a cleaner and more expressive alternative to certain uses of goto and nested loops.
>> I would appreciate feedback on:
>> Whether this feature offers sufficient practical value.
>> Whether similar functionality has been proposed before.
>> Potential problems with object lifetimes, destructors, and exception handling.
>> Whether this idea could be worth developing into a formal C++ proposal.
>> This is an early-stage idea, and I would appreciate constructive criticism.
>> Thank you!
>> -- Std-Proposals mailing list Std-Proposals_at_[hidden] https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>> --
>> Std-Proposals mailing list
>> Std-Proposals_at_[hidden] <mailto:Std-Proposals_at_[hidden]>
>> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden] <mailto:Std-Proposals_at_[hidden]>
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
> On 17. Nov 2026, at 11:37, Sebastian Wittmeier via Std-Proposals <std-proposals_at_[hidden]> wrote:
>
> The explicit motto of Larry Wall, inventor of Perl and Raku, is TIMTOWTDI - There Is More Than One Way To Do It.
> His nickname is Tim Toady.
> So it is a philosophical design choice to have everything be expressed like spoken language (instead of being obfuscated ;-) like in other languages).
>
>
> -----Ursprüngliche Nachricht-----
> Von: "Dr. Simon Schröder" <dr.simon.schroeder_at_[hidden] <mailto:dr.simon.schroeder_at_[hidden]>>
> Gesendet: Di 17.11.2026 11:28
> Betreff: Re: [std-proposals] Discussion: A proposed repeat statement for C++
> An: std-proposals_at_[hidden] <mailto:std-proposals_at_[hidden]>;
> CC: Sebastian Wittmeier <wittmeier_at_[hidden] <mailto:wittmeier_at_[hidden]>>;
> That’s good to know that other languages have this. The use cases I could find for Ruby were input validation or retrying a failed operation (e.g. network access).
>
> However, I would certainly just write a nested loop (maybe the inner loop in a separate function) with the inner loop being a ‘while’ or ‘do-while’ loop. This would clearly show which part I am retrying and we would have kind of a “single responsibility” for each loop. I would request a real world example where this clearly improves the code and does not mix two tasks in one loop if this should go towards a proposal. (Though this is just my personal opinion and I don’t have any power to influence this.)
>
>> On 17. Nov 2026, at 10:41, Sebastian Wittmeier via Std-Proposals <std-proposals_at_[hidden]> wrote:
>>
>> Raku, Ruby, and Perl have a redo instruction to do it as you stated.
>>
>> https://docs.raku.org/language/control?utm_source=chatgpt.com#Control_flow
>>
>> -----Ursprüngliche Nachricht-----
>> Von: scbd Gm via Std-Proposals <std-proposals_at_[hidden]>
>> Gesendet: Mo 16.11.2026 17:41
>> Betreff: [std-proposals] Discussion: A proposed repeat statement for C++
>> An: std-proposals_at_[hidden];
>> CC: scbd Gm <scnd2908gm_at_[hidden]>;
>> Hello everyone,
>> I'm interested in proposing a new C++ control-flow statement called repeat.
>> The motivation is to provide a dedicated way to restart the current loop iteration immediately, without executing the remaining statements or the loop's increment expression.
>> For example:
>> int x = 0; for (int i = 0; i < 5; i++) { x++; cout << "Hello\n"; if (x != 2) repeat; }
>> My proposed semantics are:
>> Restart the innermost enclosing loop body.
>> Skip the remaining statements of the current iteration.
>> Do not execute the loop's increment expression.
>> Destroy and reinitialize local objects belonging to the loop body's scope.
>> Preserve variables declared outside the loop body.
>> Support for, while, and do-while loops.
>> I believe this could provide a cleaner and more expressive alternative to certain uses of goto and nested loops.
>> I would appreciate feedback on:
>> Whether this feature offers sufficient practical value.
>> Whether similar functionality has been proposed before.
>> Potential problems with object lifetimes, destructors, and exception handling.
>> Whether this idea could be worth developing into a formal C++ proposal.
>> This is an early-stage idea, and I would appreciate constructive criticism.
>> Thank you!
>> -- Std-Proposals mailing list Std-Proposals_at_[hidden] https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>> --
>> Std-Proposals mailing list
>> Std-Proposals_at_[hidden] <mailto:Std-Proposals_at_[hidden]>
>> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden] <mailto:Std-Proposals_at_[hidden]>
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
Received on 2026-11-17 11:45:20
