From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a24:5dd4:: with SMTP id w203-v6mr1353643ita.27.1529523450330; Wed, 20 Jun 2018 12:37:30 -0700 (PDT) X-Received: by 2002:aca:d60f:: with SMTP id n15-v6mr1044359oig.6.1529523449926; Wed, 20 Jun 2018 12:37:29 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.swapon.de!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!d7-v6no1394040itj.0!news-out.google.com!z3-v6ni1840iti.0!nntp.google.com!d7-v6no1394034itj.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 20 Jun 2018 12:37:29 -0700 (PDT) In-Reply-To: <1879145989.551211041.811077.laguest-archeia.com@nntp.aioe.org> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=47.185.195.62; posting-account=zwxLlwoAAAChLBU7oraRzNDnqQYkYbpo NNTP-Posting-Host: 47.185.195.62 References: <584564c2-9f64-4965-b045-535cdaf899c0@googlegroups.com> <7cb22c58-3009-47f0-8fe7-62f3cd61785d@googlegroups.com> <1879145989.551211041.811077.laguest-archeia.com@nntp.aioe.org> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <06e9a2de-7d05-41ce-a459-c39855d429fd@googlegroups.com> Subject: Re: Why are Ada compilers difficult to write ? From: "Dan'l Miller" Injection-Date: Wed, 20 Jun 2018 19:37:30 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:53213 Date: 2018-06-20T12:37:29-07:00 List-Id: On Wednesday, June 20, 2018 at 1:58:54 PM UTC-5, Luke A. Guest wrote: > Dan'l Miller wrote: >=20 > >> * Tasks > >=20 > > So does C++17. > >=20 > >> * Protected types and objects > >=20 > > So does C++98. > > >=20 > Hardly. You can=E2=80=99t compare Ada=E2=80=99s high level tasking to the= thin veneer over > threading that=E2=80=99s in C++. Come on. Ummmm, apparently you are stuck in 1992 or something. C++=C2=A0ain't your = father's Oldsmobile anymore, to paraphrase the old television commercials. = Time marched onward in C++, as shown in the timeline at the URL=C2=A0below= . Threads-of-execution, sequence points, thread-local storage, condition v= ariables, multireader-uniwriter locks, threadsafe STL, atomic smart pointer= s, futures, latches &=C2=A0barriers, coroutines, transactional memory, task= blocks (i.e., rendezvous), plus inheriting C99's and C11's work on multith= reading and lack-of-aliasing. http://www.modernescpp.com/index.php/multithreading-in-c-17-and-c-20 Your point would be well taken if you were to shift to stability. Ada pays= especial attention to making sure that everything works together, whereas = C++ plays the "undefined behavior" card too often, especially regarding mul= tithreading interacting with other language features, most especially multi= threading interacting with other undefined-behavior-swiss-cheese language f= eatures. C++=C2=A0having a language feature and C++ having a language feat= ure that isn't like stepping gingerly through a land-mine field are 2 entir= ely different things. > >> * Discriminants > >> * Elaboration >=20 > Oh I forgot that doctors and stir sections are equivalent to Ada=E2=80=99= s > elaboration. Those sections just call the constructors and destructors.m, > it=E2=80=99s very primitive. You also can=E2=80=99t do complex initialisa= tions in C++ like > in Ada. I did amend Jeffrey Carter's claim that Ada has a quite deluxe elaboratio= n feature-set that very few if any other languages attempt to provide. Per= haps you intended this reply to be inserted after some other topic instead. > > *=C2=A0Moderately generous reflection via 'Tags >=20 > Pick any C++ lib which hasn=E2=80=99t reimplemented this! An arbitrary C++=C2=A0lib in the C++=C2=A0user community is not ISO14488 st= andard C++ in the compiler. The OP=C2=A0is talking about compilers impleme= nting language standards, not some arbitrary library out in the user commun= ity. > > * Numerous aspects (historically standardized as pragmas) > >=20 > > So does C++11, C++14, and C++17. >=20 > Really? Which? http://en.cppreference.com/w/cpp/language/attributes 12 of them standardized so far up to C++17, more likely coming in C++20: alignas, noreturn, carries_dependency, deprecated, deprecated("reason"), fa= llthrough, nodiscard, maybe_unused, likely, unlikely, no_unique_address, op= timize_for_synchronized ... plus many more proprietary ones in GNU, IBM, and Microsoft C++ compiler= s. Btw, with the exception of alignas and deprecated, C++'s attributes that ha= ve been standardized so far seem more hackerish than Ada's more pure-essenc= e-of-reality aspects/pragmas. But to the OP's question (and refuting Carte= r's claim), both C++ and Ada have aspects/attributes that need rather simil= ar difficulty of implementation as popping up sporadically in the grammar, = complicating what was a pristine much-simpler grammar decades ago.