C++ Logo


Advanced search

Re: [wg14/wg21 liaison] labels

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Wed, 12 Aug 2020 11:13:10 +0300
On Wed, 12 Aug 2020 at 10:22, Bjarne Stroustrup via Liaison
<liaison_at_[hidden]> wrote:
> I consider adding a semicolon there a very minor inconvenience. *If* I
> considered it an improvement not to add the semicolon and wanted to
> change the rule that a label labels a statement, I'd ask myself
> Why hasn't anyone bothered for almost 50 years? this cannot be all that
> important even if I like it.
> What confusions will emerge in the community? Anyone saying just
> something like "a label labels a statement" will cause confusion and/or
> attract corrections and discussions on the Web; all the teaching
> material from K&R1 onwards are no long completely correct and won't be
> brought up-to-date for decades.
> When will all tool chains I rely on be completely updated? If I write a
> piece of code using the new rule, it won't compile on any compiler or
> tool that hasn't been updated. Major compilers will comply reasonably
> soon (and may, as Richard point out, quietly start accepting programs
> that are illegal C++ thus exporting the benefits and problems to C++) ,
> third-party tools with smaller user communities may never upgrade. There
> are hundreds, probably thousands, of tools "out there" that rely on some
> sort of C or C++ parsing. Prudent coding standards would have to ban the
> new construct to avoids damaging usability.

Those are, of course, general considerations for any language change.
Which is a big part
of whether a language change provides sufficient bang for the buck.

An improvement in labels, allowing gotos that we couldn't conveniently
do before.. ..doesn't
do that, for C++ programs at large. We're fiddling with a very obscure
corner that vast amounts
of C++ programmers couldn't care less about.

Received on 2020-08-12 03:16:45