C++ Logo

std-proposals

Advanced search

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

From: Jan Schultke <janschultke_at_[hidden]>
Date: Fri, 20 Dec 2024 12:21:33 +0100
Tiago, you're the only person here who keeps insisting that "goto
labels" are fundamentally different from "loop labels". Fundamentally,
they're both labels which add a name to a following statement. Whether
that label ends up being used as the jump target for goto, or to
identify the loop which is targeted by "break" doesn't change this.
It's still a label for a statement.

If I write "int x = 0;" and never reassign "x", that doesn't change
the fact that it's a mutable variable. It's not an immutable constant.
How things are used doesn't change what they are.

> It would have a point, as it is, the paper is extremely misleading (if not right out deceptive) in this point.

This is an absurd claim. Multiple other languages have:
> label: while (true) break label;

I am proposing the same for C++. That piece of code has the EXACT SAME
syntax and the EXACT SAME semantics in e.g. Java. However, because C++
also has "goto label", it is DECEPTIVE to say it's the same as Java?!

Please stop arguing in such bad faith. You probably don't believe this
nonsense yourself. This isn't the first time on [std-proposals] you've
used the argument that ideas are bad because they don't fit your
bigoted mental model; not on technical merits.

Received on 2024-12-20 11:21:47