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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:a6b:3ad7:: with SMTP id h206-v6mr314586ioa.35.1530691191078; Wed, 04 Jul 2018 00:59:51 -0700 (PDT) X-Received: by 2002:aca:75c9:: with SMTP id q192-v6mr223321oic.3.1530691190865; Wed, 04 Jul 2018 00:59:50 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.uzoreto.com!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!d7-v6no1445079itj.0!news-out.google.com!z3-v6ni1568iti.0!nntp.google.com!u78-v6no1446906itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 4 Jul 2018 00:59:50 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=194.9.244.34; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S NNTP-Posting-Host: 194.9.244.34 References: <856189aa-fa00-4960-929e-174f352310ad@googlegroups.com> <2718c8d4-5f35-4fd8-a1aa-1e60069a7a5d@googlegroups.com> <39fce60c-9f56-42fb-b679-fa08810b00ee@googlegroups.com> <3701bf07-89a5-4cb0-a704-5aebb589ca79@googlegroups.com> <2f5e4ce0-94e8-4b94-9da7-045ec90a9b22@googlegroups.com> <18554067-1382-4b43-a832-2d27aa5117d7@googlegroups.com> <8dc19505-b68a-403c-a164-f1de1864f3f1@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Teaching C/C++ from Ada perspective? From: Maciej Sobczak Injection-Date: Wed, 04 Jul 2018 07:59:51 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:53564 Date: 2018-07-04T00:59:50-07:00 List-Id: > page 335 in =C2=A76.2 C++ Constructs and * Compile-Time Coupling: > * The word =E2=80=98excessive=E2=80=99 is practically screamed in context= here, as in: C++ headers' excessive compile-time coupling. The coupling is exactly the same as in Ada, where a change in the *private*= part of the package specification forces all clients to be recompiled, eve= n though they are presumably not affected by such modifications. The object= model is the same in both Ada and C++, which means that the compiler needs= the same kind of knowledge about how types and objects are structured. There is absolutely no difference between C++ and Ada here. > Janus Ada and Visual Studio C++ are exactly the same compiler, eh? who k= new? GCC and GCC are exactly the same compiler. Interestingly, bragging about th= at was a marketing strategy to convince potential customers to try Ada. Now, Janus Ada and VC++ might be different, but I doubt they substantially = differ in how they treat files as the physical source code items. I also gu= ess that reading text files is what Ada and C++ front-ends of GCC do simila= rly. Stop trolling. > =E2=80=A2=E2=80=A2C++ objects have a phenomenal tendency to get tangled u= p in each other=E2=80=A2=E2=80=A2. Ada somehow it was necessary to invent "limited with" for Ada. The motivati= on for this, as explained in the Ada textbooks, was exactly to deal with th= e problem of cyclic dependencies. Stop trolling. > Ada specifications do not utilize primitive header-file textual inclusion= mechanisms. They do, they are just a little bit smarter in how they do it by forcing na= mes to be declared within packages. This is the added value in Ada, but eas= y to replicate in C++. In any case, the compile-time coupling is present in= both languages and can be seen when some root package spec is updated in a= large project. For other citations, you have failed (or rather did not even attempt) to de= monstrate that the given challenges do not appear in Ada and so you did not= convince me. > Lakos's physical design is omitted by nearly all C++ coursework Sure. The physical design challenges become relevant in codebases that span= millions of lines of code. Typical students do not produce that much durin= g their homeworks in a one-semester courses and there are more important th= ings to teach that they will need earlier. BTW - my favorite argument in such discussions is that by writing your post= s you are relying on multiple large-scale C++ software systems working prop= erly. Feel free to keep ignoring it. --=20 Maciej Sobczak * http://www.inspirel.com