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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ab1d177a5a26577d X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Received: by 10.68.11.199 with SMTP id s7mr10362708pbb.5.1317795682822; Tue, 04 Oct 2011 23:21:22 -0700 (PDT) Path: lh7ni11908pbb.0!nntp.google.com!news1.google.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: What's wrong with C++? Date: Wed, 05 Oct 2011 08:21:20 +0200 Organization: Ada @ Home Message-ID: References: <1ee1a434-4048-48f6-9f5e-d8126bebb808@r19g2000prm.googlegroups.com> NNTP-Posting-Host: ayaubkfideyuokJPhZQd9Q.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/11.51 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: news1.google.com comp.lang.ada:18306 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2011-10-05T08:21:20+02:00 List-Id: Le Wed, 05 Oct 2011 06:48:43 +0200, Jeffrey Carter = a =C3=A9crit: > Most people misunderstand the halting problem, thinking it proves that= = > it is impossible to prove whether a program halts. In fact, it says it= 's = > impossible to write a program that, in finite time, can say whether an= y = > possible program halts for all inputs. It does not say it's impossible= = > to write a program that can say whether a specific program halts for a= ll = > inputs, or whether a subset of programs halt for all inputs. Yes > In fact, there are programs now that can prove whether most sequential= = > programs halt for all inputs. See the article "Proving Program = > Termination" by Cook, Podelski, and Rybalchenko in the 2011 May = > /Communications of the ACM/ for an overview of current work on this = > subject. Thanks for the reference > So I agree that the Turing completeness of C++ templates is unlikely t= o = > be a problem for real-world programs. Still does not change anything about the background. At least, if C++ = embeds a meta-programming language to such a level, then there should be= = two distinct languages, which should be executed separately. This should= = be required to at least be able to trace execution of both. So here, you= = have execution of a program: how do you trace its execution if ever need= ed = ? How do you prove it's correct if ever required ? I am not opposed to = meta-programming (I am even in favor of it), but this should belong to = specific layers, each. If I understand this blog paper, that is not the = = case (the time I used C++, I've never heard of something like this). With that, you have the macro language which is a powerful way to scatte= r = the source in any silly ways you want, and now, you have a meta-language= = merged into the language. I don't believe that help to trust your = understanding of the source you are reading. I agree this may be usable, just like the rest of C++ is usable, if you = = conscientiously keep track of traps you have to avoid (yes, I know there= = may be some traps with Ada too, like mutable records are from some point= = of views, except there are probably far few, and nothing comparable to = that). -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [Ep= igrams on = Programming =E2=80=94 Alan J. =E2=80=94 P. Yale University] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [Idem] Java: Write once, Never revisit