C++ Logo

std-proposals

Advanced search

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

From: Tiago Freire <tmiguelf_at_[hidden]>
Date: Fri, 20 Dec 2024 23:37:59 +0000
I still think that:
1. Not accidentally naming a loop when you just wanted to create a goto label.
2. Not accidentally creating a goto label when you just wanted to name a loop.
Are important.

Can we live with it? Given how rare it is likely to be used, probably won't bother so much.
Very likely this is going to come down as what proposal gets more votes from the community.
At the end of the day having the feature is more important.

________________________________
From: Std-Proposals <std-proposals-bounces_at_[hidden]> on behalf of Jan Schultke via Std-Proposals <std-proposals_at_[hidden]>
Sent: Friday, December 20, 2024 11:32:27 PM
To: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Cc: Jan Schultke <janschultke_at_[hidden]>; std-proposals_at_[hidden] <std-proposals_at_[hidden]>
Subject: Re: [std-proposals] Bringing break/continue with label to C++

> > Measurable how? How are you going to measure the merits of "label:
> > for" vs. "for label" ? The cyclomatic complexity is identical, so that
> > can't be it.
>
> By measuring the complexity when the label is actually used as a
> target of a goto.

Then you're obviously measuring how complexity increases as the result
of "goto", not the merits of one label syntax over the other, which is
what I've asked.

Or if you mean that you're just assuming that a label is used as a
goto target and taking the complexity of that, then you're measuring
based on speculation and conjecture, not based on facts.

> Cool. I'll stop doing so, then. Linter scripts solve no problems.
Language semantics do.

This explains a lot ...

> Right, because you say so, and keep insisting so despite attempts to
explain how it's no such thing.

I'm just not going to pretend like my opinion is technically and
objectively correct and all that. I have laid out a number of
technical arguments against N3377 in my draft. You have laid out
arguments in favor of it, such as the overloading of labels making it
harder to reason about some code (and I agree with that one actually).

However, it's entirely a matter of personal preference, experience,
and opinion how much importance one attributes to these arguments.
They are not actually measurable. I am okay with all that. I respect
other people's opinions.
--
Std-Proposals mailing list
Std-Proposals_at_[hidden]
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2024-12-20 23:38:03