Date: Mon, 16 Nov 2026 13:54:12 -0300
I think so. It's equivalent to using `goto` to jump back to the beginning
of the loop body.
I'm against adding new niche control flow constructs. You can just use
`goto`. We have `goto` in the language for a reason, which is that
sometimes you need to use it because none of the "more structured" control
flow constructs comfortably accommodate the control flow that you want.
Excessive use of `goto` is a code smell, but occasional, justified use is
not a problem.
The main downside of `goto` is that it can't be used during constant
evaluation, but I don't think this is a strong enough reason to add new
keywords to the core language.
On Mon, Nov 16, 2026 at 1:50 PM Anoop Rana via Std-Proposals <
std-proposals_at_[hidden]> wrote:
> Can this already be achieved by using existing features of the C++
> language? If yes, why "repeat" it. If not, list some use cases for this.
>
> On Mon, 16 Nov 2026, 22:12 Vinnie Falco via Std-Proposals, <
> std-proposals_at_[hidden]> wrote:
>
>> On Mon, Nov 16, 2026 at 8:41 AM scbd Gm via Std-Proposals <
>> std-proposals_at_[hidden]> wrote:
>>
>>> I'm interested in proposing a new C++ control-flow statement called
>>> repeat.
>>>
>> What?
>> --
>> 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]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
of the loop body.
I'm against adding new niche control flow constructs. You can just use
`goto`. We have `goto` in the language for a reason, which is that
sometimes you need to use it because none of the "more structured" control
flow constructs comfortably accommodate the control flow that you want.
Excessive use of `goto` is a code smell, but occasional, justified use is
not a problem.
The main downside of `goto` is that it can't be used during constant
evaluation, but I don't think this is a strong enough reason to add new
keywords to the core language.
On Mon, Nov 16, 2026 at 1:50 PM Anoop Rana via Std-Proposals <
std-proposals_at_[hidden]> wrote:
> Can this already be achieved by using existing features of the C++
> language? If yes, why "repeat" it. If not, list some use cases for this.
>
> On Mon, 16 Nov 2026, 22:12 Vinnie Falco via Std-Proposals, <
> std-proposals_at_[hidden]> wrote:
>
>> On Mon, Nov 16, 2026 at 8:41 AM scbd Gm via Std-Proposals <
>> std-proposals_at_[hidden]> wrote:
>>
>>> I'm interested in proposing a new C++ control-flow statement called
>>> repeat.
>>>
>> What?
>> --
>> 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]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
-- *Brian Bi*
Received on 2026-11-16 16:54:29
