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:4689:: with SMTP id j131-v6mr1336982itb.55.1529523586154; Wed, 20 Jun 2018 12:39:46 -0700 (PDT) X-Received: by 2002:a9d:296a:: with SMTP id d97-v6mr260379otb.1.1529523585869; Wed, 20 Jun 2018 12:39:45 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.linkpendium.com!news.linkpendium.com!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!d7-v6no1395768itj.0!news-out.google.com!z3-v6ni1840iti.0!nntp.google.com!d7-v6no1395762itj.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 20 Jun 2018 12:39:45 -0700 (PDT) In-Reply-To: <06e9a2de-7d05-41ce-a459-c39855d429fd@googlegroups.com> 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> <06e9a2de-7d05-41ce-a459-c39855d429fd@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <46f00d2b-7c84-4432-b7d8-5e26f25c8ece@googlegroups.com> Subject: Re: Why are Ada compilers difficult to write ? From: "Dan'l Miller" Injection-Date: Wed, 20 Jun 2018 19:39:46 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:53214 Date: 2018-06-20T12:39:45-07:00 List-Id: On Wednesday, June 20, 2018 at 2:37:31 PM UTC-5, Dan'l Miller wrote: > 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 t= he thin veneer over > > threading that=E2=80=99s in C++. Come on. >=20 > Ummmm, apparently you are stuck in 1992 or something. C++=C2=A0ain't you= r father's Oldsmobile anymore, to paraphrase the old television commercials= . Time marched onward in C++, as shown in the timeline at the URL=C2=A0bel= ow. Threads-of-execution, sequence points, thread-local storage, condition= variables, multireader-uniwriter locks, threadsafe STL, atomic smart point= ers, futures, latches &=C2=A0barriers, coroutines, transactional memory, ta= sk blocks (i.e., rendezvous), plus inheriting C99's and C11's work on multi= threading and lack-of-aliasing. > http://www.modernescpp.com/index.php/multithreading-in-c-17-and-c-20 >=20 > Your point would be well taken if you were to shift to stability. Ada pa= ys especial attention to making sure that everything works together, wherea= s C++ plays the "undefined behavior" card too often, especially regarding m= ultithreading interacting with other language features, most especially mul= tithreading interacting with other undefined-behavior-swiss-cheese language= features. C++=C2=A0having a language feature and C++ having a language fe= ature that isn't like stepping gingerly through a land-mine field are 2 ent= irely different things. >=20 > > >> * Discriminants > > >> * Elaboration > >=20 > > Oh I forgot that doctors and stir sections are equivalent to Ada=E2=80= =99s > > elaboration. Those sections just call the constructors and destructors.= m, > > it=E2=80=99s very primitive. You also can=E2=80=99t do complex initiali= sations in C++ like > > in Ada. >=20 > I did amend Jeffrey Carter's claim that Ada has a quite deluxe elaborat= ion feature-set that very few if any other languages attempt to provide. P= erhaps you intended this reply to be inserted after some other topic instea= d. I did *not* amend Jeffrey Carter's claim that Ada has a quite deluxe elabor= ation feature-set ... > > > *=C2=A0Moderately generous reflection via 'Tags > >=20 > > Pick any C++ lib which hasn=E2=80=99t reimplemented this! >=20 > An arbitrary C++=C2=A0lib in the C++=C2=A0user community is not ISO14488 = standard C++ in the compiler. The OP=C2=A0is talking about compilers imple= menting language standards, not some arbitrary library out in the user comm= unity. >=20 > > > * Numerous aspects (historically standardized as pragmas) > > >=20 > > > So does C++11, C++14, and C++17. > >=20 > > Really? Which? >=20 > http://en.cppreference.com/w/cpp/language/attributes >=20 > 12 of them standardized so far up to C++17, more likely coming in C++20: > alignas, noreturn, carries_dependency, deprecated, deprecated("reason"), = fallthrough, nodiscard, maybe_unused, likely, unlikely, no_unique_address, = optimize_for_synchronized >=20 > ... plus many more proprietary ones in GNU, IBM, and Microsoft C++ compil= ers. >=20 > Btw, with the exception of alignas and deprecated, C++'s attributes that = have been standardized so far seem more hackerish than Ada's more pure-esse= nce-of-reality aspects/pragmas. But to the OP's question (and refuting Car= ter's claim), both C++ and Ada have aspects/attributes that need rather sim= ilar difficulty of implementation as popping up sporadically in the grammar= , complicating what was a pristine much-simpler grammar decades ago.