C++ Logo

liaison

Advanced search

Re: [wg14/wg21 liaison] labels

From: Uecker, Martin <Martin.Uecker_at_[hidden]>
Date: Wed, 12 Aug 2020 09:57:29 +0000
Am Mittwoch, den 12.08.2020, 11:13 +0300 schrieb Ville Voutilainen via Liaison:
> 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.

The main reason for making the minor additional change to
C++ would be for better compatibility with C. With the
accepted changes in C the main compatibility issue
(labels before declarations) is removed.

This does not seem to be appreciated too much by some
members of the C++ community, I but in my opinion this
is already a nice improvement.

Best,
Martin

Received on 2020-08-12 05:00:56