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 10.13.213.149 with SMTP id x143mr18433220ywd.52.1481185382752; Thu, 08 Dec 2016 00:23:02 -0800 (PST) X-Received: by 10.157.17.3 with SMTP id g3mr4889435ote.8.1481185382715; Thu, 08 Dec 2016 00:23:02 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!p16no4196147qta.1!news-out.google.com!j8ni13365qtc.0!nntp.google.com!n6no4199553qtd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 8 Dec 2016 00:23:02 -0800 (PST) In-Reply-To: <1905815374.502825168.454102.laguest-archeia.com@nntp.aioe.org> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=165.225.80.114; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S NNTP-Posting-Host: 165.225.80.114 References: <1905815374.502825168.454102.laguest-archeia.com@nntp.aioe.org> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Introductory Presentations, especially aimed at C++ programmers! From: Maciej Sobczak Injection-Date: Thu, 08 Dec 2016 08:23:02 +0000 Content-Type: text/plain; charset=UTF-8 Xref: news.eternal-september.org comp.lang.ada:32673 Date: 2016-12-08T00:23:02-08:00 List-Id: > A good way to compare is to take something that is easy but easily > fuckupable, like cycling an int between it's bounds in C++. It is trivial with a wider type (like int64_t) as a base and really nobody needs to do full-cycle over int64_t. This example is nice, but not convincing. > Implement a > cyclic buffer in both languages, http://www.boost.org/doc/libs/1_61_0/doc/html/circular_buffer.html > show iteration over the container. If you take Ada 2012, make sure to take C++11 (or C++14) as well, for fair comparison: http://www.cprogramming.com/c++11/c++11-ranged-for-loop.html Note also that containers are much easier for beginners in C++, as they require less clutter at declaration. Try to recode examples from the above link in Ada to see why you would not convince a C++ programmer with such arguments. -- Maciej Sobczak * http://www.inspirel.com