• Re: "Herb Sutter: Why C++ Is Growing and What C++26 Means for

    From thanks-to@thanks-to@Taf.com to comp.lang.c++,comp.lang.ada,comp.lang.eiffel on Sat May 9 21:57:05 2026
    From Newsgroup: comp.lang.ada

    Boltar@caprica.Universe wrote: |-------------------------------------------------------------------------------|
    |"On Sat, 9 May 2026 07:31:02 -0400 |
    |Chris Ahlstrom <OFeem1987@teleworm.us> gabbled: |
    Lynn McGuire wrote this screed in ALL-CAPS: |
    Hat tip to: |
    http://herbsutter.com/2026/04/29/london-meetup/ |
    |
    Heh, I only recently started using C++17 features. |
    |
    Herb talks about C++20 issues with: |
    |
    - Modules. (They don't work.) |
    - Coroutines. (They're not actually coroutines.) |
    | |
    |Quite how they managed to come up with such an utter abortion of an |
    |implementation is anyones guess. They should have taken a look at how |
    |Python does it - the function returns an iterator and you call "yield <result>"|
    |inside it. Done. |
    | |
    - Concepts. (Cool, but most of you won't ever write one.) |
    | |
    |But morons conducting job interviews will still ask about them even though |
    |their company code doesn't contain them either. |
    | |
    Apparently GCC will be getting contracts and reflection "soon". |
    | |
    |I can't wait for contracts and reflection in C++! |
    | |
    |Said no one , ever." |
    |-------------------------------------------------------------------------------|

    How about contracts in Eiffel or Ada?

    Message-ID: <9c75e0f1-d977-40a3-b8c4-64751c6e0a39n@googlegroups.com>
    says since
    Date: Sat, 8 Apr 2023 10:27:16 -0700 (PDT)
    -
    |-------------------------------------------------------------------------| |"On Saturday, April 8, 2023 at 6:48:14 PM UTC+2, Simon Wright wrote: |
    GCC 12.2.0 accepts this code with -gnat2022. |
    | | |True! Cool... In my opinion, contracts are among the coolest (and maybe| |more exclusive) features of Ada" | |-------------------------------------------------------------------------|

    (S. HTTP://Gloucester.Insomnia247.NL/ fuer Kontaktdaten!)
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From thanks-to@thanks-to@Taf.com to comp.lang.c++,comp.lang.ada on Sun May 10 20:24:03 2026
    From Newsgroup: comp.lang.ada

    Boltar@caprica.Universe wrote:
    |---------------------------------------------|
    |"You ever had to program in Ada? Its a PITA."| |---------------------------------------------|

    I disagree.
    (S. HTTP://Gloucester.Insomnia247.NL/ fuer Kontaktdaten!)
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From geodandw@geodandw@gmail.com to comp.lang.c++,comp.lang.ada on Sun May 10 17:52:30 2026
    From Newsgroup: comp.lang.ada

    On 5/10/26 16:24, Nioclás Pól Caileán de Ghloucester wrote:
    Boltar@caprica.Universe wrote: |---------------------------------------------|
    |"You ever had to program in Ada? Its a PITA."| |---------------------------------------------|

    I disagree.
    (S. HTTP://Gloucester.Insomnia247.NL/ fuer Kontaktdaten!)
    Its a PITA because you have to have it correct before it compiles, as
    opposed to C++ where you don't.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From kalevi@kalevi@kolttonen.fi (Kalevi Kolttonen) to comp.lang.c++,comp.lang.ada on Sun May 10 22:07:27 2026
    From Newsgroup: comp.lang.ada

    In comp.lang.c++ geodandw <geodandw@gmail.com> wrote:
    Its a PITA because you have to have it correct before it compiles, as opposed to C++ where you don't.

    I have heard that Ada is being used in situations where correctness
    is of utmost importance. One such field is aviation, I suppose.

    br,
    KK
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From thanks-to@thanks-to@Taf.com to comp.lang.c++,comp.lang.ada on Mon May 11 08:00:33 2026
    From Newsgroup: comp.lang.ada

    Correctness is a good thing.
    (S. HTTP://Gloucester.Insomnia247.NL/ fuer Kontaktdaten!)
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From boltar@boltar@caprica.universe to comp.lang.c++,comp.lang.ada on Mon May 11 08:22:55 2026
    From Newsgroup: comp.lang.ada

    On Sun, 10 May 2026 17:52:30 -0400
    geodandw <geodandw@gmail.com> gabbled:
    On 5/10/26 16:24, Nioclás Pól Caileán de Ghloucester wrote:
    Boltar@caprica.Universe wrote:
    |---------------------------------------------|
    |"You ever had to program in Ada? Its a PITA."|
    |---------------------------------------------|

    I disagree.
    (S. HTTP://Gloucester.Insomnia247.NL/ fuer Kontaktdaten!)
    Its a PITA because you have to have it correct before it compiles, as >opposed to C++ where you don't.

    Its a PITA because its long winded like Java, has the god awful pascal
    style syntax, and far too many basic operations throw exceptions instead of simply returning success/failure values.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Luke A. Guest@laguest@archeia.com to comp.lang.c++,comp.lang.ada on Mon May 11 12:20:59 2026
    From Newsgroup: comp.lang.ada

    On 11/05/2026 09:22, boltar@caprica.universe wrote:


    Its a PITA because its long winded like Java, has the god awful pascal
    style syntax, and far too many basic operations throw exceptions instead
    of simply returning success/failure values.


    so, you're admitting that you've never seen Ada, Pascal has a horrible
    syntax mainly because of it's semicolon as a separator mess. Semicolon's
    end statements in Ada, also looks nothing like Pascal apart from begin
    blocks, which aren't in block statements unlike Pascal.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From J-P. Rosen@rosen@adalog.fr to comp.lang.c++,comp.lang.ada on Mon May 11 16:16:04 2026
    From Newsgroup: comp.lang.ada

    Le 11/05/2026 à 10:22, boltar@caprica.universe a écrit :
    Its a PITA because its long winded like Java, has the god awful pascal
    style syntax, and far too many basic operations throw exceptions instead
    of simply returning success/failure values.

    Exceptions are much better for safety, since an exception cannot be ignored, while it is too easy to forget to check a success/failure return value.

    "There is only one thing worse than a program that crashes: a program that produces wrong, but apparently correct results"
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From boltar@boltar@caprica.universe to comp.lang.c++,comp.lang.ada on Mon May 11 15:08:51 2026
    From Newsgroup: comp.lang.ada

    On Mon, 11 May 2026 12:20:59 +0100
    "Luke A. Guest" <laguest@archeia.com> gabbled:
    On 11/05/2026 09:22, boltar@caprica.universe wrote:


    Its a PITA because its long winded like Java, has the god awful pascal
    style syntax, and far too many basic operations throw exceptions instead
    of simply returning success/failure values.


    so, you're admitting that you've never seen Ada, Pascal has a horrible

    No, I never saw it while I was working on it, did everything blindfold.

    syntax mainly because of it's semicolon as a separator mess. Semicolon's
    end statements in Ada, also looks nothing like Pascal apart from begin >blocks, which aren't in block statements unlike Pascal.

    The syntax is derived from pascal, stop pretending otherwise.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From OrangeFish@OrangeFish@invalid.invalid to comp.lang.ada on Mon May 11 12:27:14 2026
    From Newsgroup: comp.lang.ada

    On 2026-05-10 18:07, Kalevi Kolttonen wrote:
    In comp.lang.c++ geodandw <geodandw@gmail.com> wrote:
    Its a PITA because you have to have it correct before it compiles, as
    opposed to C++ where you don't.

    I have heard that Ada is being used in situations where correctness
    is of utmost importance. One such field is aviation, I suppose.

    br,
    KK

    Some years ago, I attended an introductory course on CMM. Two
    classmates worked in military avionics. They told me that there was a
    trend to move from ADA to C++ because "it was becoming standard". That
    was one of the most depressing and frightening things I have heard in a
    while.

    However, I understand that Airbus uses both ADA and C++ in critical systems.

    OF
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?B?QmrDtnJu?= Persson@Bjorn@xn--rombobjrn-67a.se to comp.lang.c++,comp.lang.ada on Mon May 11 19:44:31 2026
    From Newsgroup: comp.lang.ada

    boltar@caprica.universe wrote:
    Its a PITA because its long winded like Java,
    So Ada isn't optimal for code golf and obfuscation contests. Feel free
    to choose another language for those purposes.
    Each line or fragment of source code is written once and read many
    times. Thus clarity is more important than saving keystrokes. Typing
    speed isn't the bottleneck anyway. I spend more time thinking about the
    correct solution than I do typing.
    has the god awful pascal style syntax,
    You mean a syntax that doesn't let you write "if(x = 0)" bugs? A syntax
    that makes sense when read left-to-right, unlike C where the best way
    to make sense of a declaration is to read it from the middle towards
    both ends?
    A syntax where instead of this:
    }
    }
    }
    }
    you'll see this:
    end if;
    end loop;
    end if;
    end Foo;
    If a closing brace is missing, a C/C++ compiler will spout lots of
    misleading error messages, and then report the missing brace at the end
    of the file – or even at the end of another file. An Ada compiler can
    say "hey, an "end loop" is missing before this "end if" right here".
    Yeah, how awful!
    and far too many basic operations throw exceptions instead of simply returning success/failure values.
    Here's an example from last year of how returning success/failure
    values leads to bugs:
    https://www.qualys.com/2025/02/18/openssh-mitm-dos.txt
    Security researchers found several errors in the handling of error codes
    in OpenSSH. One of them could be used to impersonate an SSH server. A
    quote from their security advisory:
    | - in verify_host_key() (when VerifyHostKeyDNS is enabled, at line 1538),
    | if sshkey_from_private() returns any non-zero error code (at line
    | 1543), then this error code is immediately returned to
    | verify_host_key()'s caller (at line 1580);
    |
    | - unfortunately, in verify_host_key_callback() (verify_host_key()'s
    | caller), only the return value -1 is treated as an error (at lines
    | 101-103);
    |
    | - any other return value (for example, -2) is ignored, and zero
    | (success) is mistakenly returned to verify_host_key_callback()'s
    | caller (at line 104), as if no error had occurred, and without
    | checking the server's host key at all.
    With exceptions it's not so easy to get confused about what's success
    and what's a failure.
    Of course, code of lower quality than OpenSSH often neglects to check
    for error codes at all. Forgetting to check for an exception doesn't
    cause it to be silently treated as a success.
    Björn Persson
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.lang.c++,comp.lang.ada on Mon May 11 22:33:09 2026
    From Newsgroup: comp.lang.ada

    On Mon, 11 May 2026 08:22:55 -0000 (UTC), boltar wrote:

    Its a PITA because its long winded like Java, has the god awful
    pascal style syntax ...

    Even C++ is now discovering why it can be preferable to have the
    function return type specified after the arguments, rather than
    before.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.lang.c++,comp.lang.ada on Tue May 12 02:21:51 2026
    From Newsgroup: comp.lang.ada

    On Mon, 11 May 2026 16:16:04 +0200, J-P. Rosen wrote:

    Le 11/05/2026 à 10:22, boltar@caprica.universe a écrit :

    Its a PITA because its long winded like Java, has the god awful
    pascal style syntax, and far too many basic operations throw
    exceptions instead of simply returning success/failure values.

    Exceptions are much better for safety, since an exception cannot be
    ignored, while it is too easy to forget to check a success/failure
    return value.

    "There is only one thing worse than a program that crashes: a
    program that produces wrong, but apparently correct results"

    Worth also pointing out that Ada doesn’t require you to declare all
    the exceptions a routine can return up front, unlike Java, where this
    just adds to the clutter.

    Also, Ada has typedefs, Java doesn’t. Ada has unsigned integers, Java doesn’t. Ada had generics from the start, Java had to tack them on afterwards, with some interesting consequences for backward
    compatibiliy.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From boltar@boltar@caprica.universe to comp.lang.c++,comp.lang.ada on Tue May 12 08:30:43 2026
    From Newsgroup: comp.lang.ada

    On Mon, 11 May 2026 19:44:31 +0200
    =?UTF-8?B?QmrDtnJu?= Persson <Bjorn@xn--rombobjrn-67a.se> gabbled: >boltar@caprica.universe wrote:
    Its a PITA because its long winded like Java,

    So Ada isn't optimal for code golf and obfuscation contests. Feel free
    to choose another language for those purposes.

    Each line or fragment of source code is written once and read many
    times. Thus clarity is more important than saving keystrokes. Typing

    I'm not going to defend the clarity of C++, frankly the syntax is a mess.
    But overdone long windedness doesn't aid clarity any more than adding ever
    more punctuation to the syntax does. As in all things there's a happy medium.

    has the god awful pascal style syntax,

    You mean a syntax that doesn't let you write "if(x =3D 0)" bugs? A syntax

    Set and test is not always a bug depending on what construct its used in. Besides which, most (all?) modern C/C++ compilers will throw a warning anyway.

    that makes sense when read left-to-right, unlike C where the best way
    to make sense of a declaration is to read it from the middle towards
    both ends?

    Huh?

    A syntax where instead of this:

    }
    }
    }
    }

    Clean and tidy.

    you'll see this:

    end if;
    end loop;
    end if;
    end Foo;

    Yuck. Its visual noise.

    If a closing brace is missing, a C/C++ compiler will spout lots of
    misleading error messages, and then report the missing brace at the end
    of the file =E2=80=93 or even at the end of another file. An Ada compiler c= >an
    say "hey, an "end loop" is missing before this "end if" right here".
    Yeah, how awful!

    I'll give you that one.

    and far too many basic operations throw exceptions instead of simply retu= >rning success/failure values.

    Here's an example from last year of how returning success/failure
    values leads to bugs:

    https://www.qualys.com/2025/02/18/openssh-mitm-dos.txt

    I'm sure they do, but sometimes checking return values is simpler and tidier than having to remember and check for everything that might end up in a
    handler down the bottom of the code or even worse having begin-exception
    blocks around every damn bit of code that might cause them if you don't
    want a catch-all handler.

    Security researchers found several errors in the handling of error codes
    in OpenSSH. One of them could be used to impersonate an SSH server. A
    quote from their security advisory:

    There are many reasons for security holes in software. I imagine poor
    checking of return codes is in the statistical noise compared to the more common ones.


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From boltar@boltar@caprica.universe to comp.lang.c++,comp.lang.ada on Tue May 12 08:38:32 2026
    From Newsgroup: comp.lang.ada

    On Mon, 11 May 2026 22:33:09 -0000 (UTC)
    Lawrence =?iso-8859-13?q?D=FFOliveiro?= <ldo@nz.invalid> gabbled:
    On Mon, 11 May 2026 08:22:55 -0000 (UTC), boltar wrote:

    Its a PITA because its long winded like Java, has the god awful
    pascal style syntax ...

    Even C++ is now discovering why it can be preferable to have the
    function return type specified after the arguments, rather than
    before.

    Really? The ONLY reason for the -> operator being overloaded for return
    values is because thats how it was decided to implement lambda syntax
    back in 2011 for reasons best known to themselves. Using it in normal
    function definitions is frankly assinine.

    auto main(int argc, char **argv) -> int
    {

    etc is just poncy coding style in order to make the author seem smart plus
    the syntax is idiotic because in this case "auto" is overloaded simply to be
    a function start placeholder. If the semantics were sane it wouldn't be needed but I imagine that would make the lexical analysis even more complicated.

    --- Synchronet 3.22a-Linux NewsLink 1.2