Date: Mon, 6 Jan 2025 10:57:25 +0100
On Sun, 5 Jan 2025 at 15:50, Avi Kivity via Std-Proposals <
std-proposals_at_[hidden]> wrote:
> 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?
>
switch/case is at its core syntactic sugar for a sequence of goto.
continue and break are syntactic sugar for goto.
Hand wringing over the presence of goto in a program is an utterly
pointless exercise performed by people who like to pretend that computers
work differently to the way they actually do.
There is absolutely no reason why goto cannot be compiled at compile time.
If while(1) { if (condition() break; } can work at compile time, so can goto
.
Can we stop doing this? It's been 40 years. Honestly...
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
std-proposals_at_[hidden]> wrote:
> 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?
>
switch/case is at its core syntactic sugar for a sequence of goto.
continue and break are syntactic sugar for goto.
Hand wringing over the presence of goto in a program is an utterly
pointless exercise performed by people who like to pretend that computers
work differently to the way they actually do.
There is absolutely no reason why goto cannot be compiled at compile time.
If while(1) { if (condition() break; } can work at compile time, so can goto
.
Can we stop doing this? It's been 40 years. Honestly...
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
Received on 2025-01-06 09:57:38