C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Bringing break/continue with label to C++

From: Jan Schultke <janschultke_at_[hidden]>
Date: Fri, 20 Dec 2024 13:10:36 +0100
> Likewise. When I see a named loop, I don't have to worry about and look for gotos jumping to its label, the problem never comes up.

How often do people realistically use goto to where you'd even be
worried about this? Genuine question; do you work on code bases where
you frequently encounter gotos?

Also note that with "goto cleanup" being replaced by C++ RAII
, and with "goto after_loop;" being replaced by "break loop;", goto in
C++ would become extremely rare.

You could realistically write one million lines of C++ code and not
need it once.

Received on 2024-12-20 12:10:49