Date: Fri, 20 Dec 2024 14:15:27 +0200
On Fri, 20 Dec 2024 at 14:10, Jan Schultke <janschultke_at_[hidden]> wrote:
>
> > 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?
ville_at_fedora:~/gcc/gcc/cp$ ag goto | wc -l
763
ville_at_fedora:~/gcc/gcc$ ag 'goto .*;' | wc -l
11111
Yes, I do.
And even if I wouldn't, it's much easier to reason about a loop-name
that just cannot be a label that a goto
cannot target. That knowledge categorically turns off some concerns.
>
> > 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?
ville_at_fedora:~/gcc/gcc/cp$ ag goto | wc -l
763
ville_at_fedora:~/gcc/gcc$ ag 'goto .*;' | wc -l
11111
Yes, I do.
And even if I wouldn't, it's much easier to reason about a loop-name
that just cannot be a label that a goto
cannot target. That knowledge categorically turns off some concerns.
Received on 2024-12-20 12:15:40