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.8.135 with SMTP id r7mr8967919pba.8.1317762022240; Tue, 04 Oct 2011 14:00:22 -0700 (PDT) Path: lh7ni11606pbb.0!nntp.google.com!news1.google.com!goblin3!goblin1!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: Tue, 04 Oct 2011 23:00:20 +0200 Organization: Ada @ Home Message-ID: References: <1ee1a434-4048-48f6-9f5e-d8126bebb808@r19g2000prm.googlegroups.com> NNTP-Posting-Host: zr8m5dsiG+Rs6FWy4ndNjg.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:18301 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2011-10-04T23:00:20+02:00 List-Id: Le Tue, 04 Oct 2011 22:51:29 +0200, Yannick Duch=C3=AAne (Hibou57) = a =C3=A9crit: > Here is an easy to read interesting answer to that question, from a C+= + = > user, reporting about a C++ conference he attended to. > > http://cpptruths.blogspot.com/2005/10/whats-wrong-with-c.html Quoted from a comment in the above link > "One of the big issues was the extreme difficulty of parsing C++." > > It is ___provably___ impossible to write a correct C++ parser which > will complete compilation with either success of failure because the > C++ template system is Turing complete. This means that code generatio= n > is based on a turing complete program. Code generation in C++ isn't > based on a program description, but an actual turing complete program.= > > As such, it is subject to the halting problem. Therefore, it is > unknowable whether a compilation will complete, and unknowable if > you are looking at a valid C++ program. So OK, it is formally proved that is not even sure a given C++ source fi= le = can really be compiled or not. That's big, ouch. That achieve to prove that along with the domain troubles and = difficulties, you are also in as great troubles with the source it self.= May be C++ would need to go beyond of Ada SPARK or Ada design by contrac= t = (tm), and add stuff to prove a C++ source is correct and can be compiled= , = before any attempt to prove what it will compiled is correct (oops). -- = =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