C++ Logo

std-proposals

Advanced search

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

From: Brian Bi <bbi5291_at_[hidden]>
Date: Fri, 20 Dec 2024 09:58:09 -0500
If I understand correctly, an argument made by some people on this thread
is "if we use the current label syntax to support the `break` <label> and
`continue` <label>` feature, then it will lead to a proliferation of labels
in programs, which will then increase the number of `goto` statements."

The last step in this argument seems highly speculative. As I see it, there
is a strong cultural norm against using `goto`, and people are able to
avoid using `goto` even though they already use labels (i.e. in `switch`
statements), so, I do not see why adding labels in more places would make
the situation any worse.
-- 
*Brian Bi*

Received on 2024-12-20 14:58:24