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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a02:1bd3:: with SMTP id 80-v6mr9888556jas.23.1530511002253; Sun, 01 Jul 2018 22:56:42 -0700 (PDT) X-Received: by 2002:aca:4787:: with SMTP id u129-v6mr1951022oia.4.1530511002016; Sun, 01 Jul 2018 22:56:42 -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!border2.nntp.dca1.giganews.com!nntp.giganews.com!d7-v6no2811707itj.0!news-out.google.com!p13-v6ni4304itf.0!nntp.google.com!d7-v6no2811706itj.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 1 Jul 2018 22:56:41 -0700 (PDT) In-Reply-To: <2718c8d4-5f35-4fd8-a1aa-1e60069a7a5d@googlegroups.com> 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> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <39fce60c-9f56-42fb-b679-fa08810b00ee@googlegroups.com> Subject: Re: Teaching C/C++ from Ada perspective? From: Maciej Sobczak Injection-Date: Mon, 02 Jul 2018 05:56:42 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:53496 Date: 2018-07-01T22:56:41-07:00 List-Id: =20 > Oh, so the take-away is: [...] Nothing of what you wrote is a take-away, because I did not write any of th= is. > bad C++ instructors don't teach classes and namespaces and C++ standard l= ibrary's containers? I don't know what bad instructors teach. I know what good instructors shoul= d teach. > I strongly believe that thinking-in-Ada has so vastly much more to contri= bute to C++-based program design than merely =E2=80=9CMake sure that you us= e classes & namespaces & C++ standard library's containers=E2=80=9D. You have skipped other important points that I have made. Don't troll with = me, it's too cheap. "Thinking-in-Ada" is a micro-skill that is best used in Ada. Conversely, if= you are using Ada but you do not think-in-Ada, then it is a recipe for dis= aster. Thinking-in-Ada is a very valuable skill once you have it, but it i= s still a micro-skill that has its proper use only with Ada. What you need = when transitioning to another language (even more when you teach others) is= thinking in terms of good design and good idioms, so that you can apply th= em onto your thinking-in-other-language. Ada has a lot to contribute in thi= s area and learning Ada is a good way to acquire these skills, but these sk= ills are not exclusive or limited to Ada, so I will not call them thinking-= in-Ada. In other words: if you are about to teach C++, then think-in-C++ and bring = in your good design and idiomatic habits that you have already acquired. But don't get obsessed with micro details, because this is where you will b= e forcing a round peg into a square whole. It's not effective. The following: #define begin { #define end } is a very bad example of thinking-in-Ada applied to C++. On the other end o= f the scale you have modular design with the use of physical program struct= ure, which is a good example of a skill that is transferable (and therefore= not exclusive to any language, but possible to acquire in Ada). Everything= else is somewhere in between with a gray division area with space for subj= ective judgement. Integer ranges is an example of thinking-in-Ada that does= not translate well to C++. The select statement is another example of thin= king-in-Ada that should not be forced to C++, although protected objects ar= e very welcome. And so on. --=20 Maciej Sobczak * http://www.inspirel.com