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 14:20:43 +0100
> Yes, we do. It's a name of the loop, scoped to that loop, not a generic label.

The proposal also makes the argument that you can achieve
disambiguation through naming conventions. The two different name
syntaxes of N3377 don't solve a parsing ambiguity, they just increase
comfort. Do you actually disagree with that? What's the issue with
just using naming conventions for this?

> > "This is a readability issue; with the exception of goto and labels,
> > function bodies can be understood by reading them from top to bottom."
>
> The claim is not correct for member functions defined inside a class
definition before data member declarations.

This is why I've specifically said "function bodies" :) Outside of
function bodies, pretty much anything goes, and the declaration of a
construct you use may not even be in the same file.

I will admit that some of these arguments are not particularly strong
arguments. However, the N3377 syntax is not technically necessary (as
proven by Go, Perl, and D), so we're arguing somewhat on preferences
anyway.

Received on 2024-12-20 13:20:56