C++ Logo

std-proposals

Advanced search

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

From: Avi Kivity <avi_at_[hidden]>
Date: Sun, 05 Jan 2025 16:50:47 +0200
On Fri, 2024-12-20 at 16:42 +0200, Ville Voutilainen via Std-Proposals
wrote:
> On Fri, 20 Dec 2024 at 16:40, Jan Schultke
> <janschultke_at_[hidden]> wrote:
> >
> > > > See, the 'dislike' for goto isn't a 'dislike' at all.
> >
> > > Yes, it is.
> >
> > Or to be fair, no, I'm wrong. That's not what I was trying to say.
> >
> > It totally see the issue with goto. But dislike for using "label:"
> > syntax IS a pure dislike. It has nothing to do with cyclomatic
> > complexity and is just a means to circumvent using naming
> > conventions
> > and writing linter scripts. It's not technically necessary.
>
> Yes, linter scripts can also be used for banning conversions between
> unrelated pointers, so we don't actually need
> type safety in a programming language.
>
> Or linter scripts can be used to make sure you don't have
> memory-safety problems in your programs, so we don't
> need memory-safe programming languages.
>
> Linter scripts are a solution yet to show its effectiveness. And
> that's been the case for various suggestions of their
> use for more than 40 years.


Wouldn't something like -Werror=goto suffice here?

Received on 2025-01-05 14:50:53