Date: Mon, 6 Jan 2025 21:48:45 -0500
Back in my ancient programming days, I would start ed and go
g/goto/p
and I would know all the labels that were the targets of gotos.
I doubt that this task has gotten significantly harder since.
On Mon, Jan 6, 2025, 8:54 PM Ville Voutilainen <ville.voutilainen_at_[hidden]>
wrote:
> On Tue, 7 Jan 2025 at 03:35, Hyman Rosen via Std-Proposals
> <std-proposals_at_[hidden]> wrote:
> >
> > Attaching labels to do/for/while/switch statements and having gotos
> target them is already legal in C and C++. If someone needs that construct,
> they can already use it whether the would-be masters of C++ style like it
> or not. So the argument against using those labels for break/continue seems
> to be that programmers would not normally write such gotos, but once they
> attach the labels, the temptation will be so overwhelming that they won't
> be able to help themselves. Which ... I can't even.
>
> That's not the argument. The argument is that if you happen to have
> gotos in your code, and I happen to have labeled loops in the same
> code, I don't
> have to consider my labeled loops as possible targets of your
> spaghetti jumps, because they can't be. I don't need to include them
> in my search for
> the possible targets of your spaghetti jumps.
>
g/goto/p
and I would know all the labels that were the targets of gotos.
I doubt that this task has gotten significantly harder since.
On Mon, Jan 6, 2025, 8:54 PM Ville Voutilainen <ville.voutilainen_at_[hidden]>
wrote:
> On Tue, 7 Jan 2025 at 03:35, Hyman Rosen via Std-Proposals
> <std-proposals_at_[hidden]> wrote:
> >
> > Attaching labels to do/for/while/switch statements and having gotos
> target them is already legal in C and C++. If someone needs that construct,
> they can already use it whether the would-be masters of C++ style like it
> or not. So the argument against using those labels for break/continue seems
> to be that programmers would not normally write such gotos, but once they
> attach the labels, the temptation will be so overwhelming that they won't
> be able to help themselves. Which ... I can't even.
>
> That's not the argument. The argument is that if you happen to have
> gotos in your code, and I happen to have labeled loops in the same
> code, I don't
> have to consider my labeled loops as possible targets of your
> spaghetti jumps, because they can't be. I don't need to include them
> in my search for
> the possible targets of your spaghetti jumps.
>
Received on 2025-01-07 02:48:57