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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f822ae7b0f7433c1 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!bolzen.all.de!newsfeed.ision.net!newsfeed2.easynews.net!ision!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Translating an embedded C algorithm Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <878xg2aqzr.fsf@ludovic-brenta.org> <87k5zk7m8j.fsf@ludovic-brenta.org> Date: Sat, 20 Jan 2007 10:54:35 +0100 Message-ID: NNTP-Posting-Date: 20 Jan 2007 10:54:21 CET NNTP-Posting-Host: 6bf63793.newsspool1.arcor-online.net X-Trace: DXC=mX2j@C<=gML74okIm;?DS@ic==]BZ:afN4Fo<]lROoRA^YC2XCjHcbIDoC`<6F[4mDDNcfSJ;bb[EIRnRBaCdfG X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:8356 Date: 2007-01-20T10:54:21+01:00 List-Id: On Fri, 19 Jan 2007 15:27:58 -0500, Robert A Duff wrote: > But the OP didn't ask anybody to "show the crucial differences between C > and Ada"; he asked for a simple half-page C function to be translated > into Ada, which is a perfectly reasonable request. Sure, but that piece of code was intended to demonstrate a solution of some problem by means of a programming language. > He also got "we can't translate simple C into simple > Ada -- we need to create a hugely complicated mess", For good or bad, but this one of key features of Ada as a programming language, I think. My theory is that Ada has a much finer and precise definition of program semantics. It is a deeply layered "mess" of "what-ifs," which normal C programmers would just promptly ignore. In Ada I never know if there couldn't be a better way, or whether there were a hidden gotcha in some rare obscure pathological case. This is not good. In C++ I just don't care, I know for sure, there are lots. My attitude is different. This is also not good, but has huge psychological (=>marketing) advantages over Ada. > and he also got > "you dope, how dare you ask about Ada when you don't already know Ada". I don't justify this, but I understand the reasons, cultural reasons. I tolerate much worse C++ code from myself and others, than I could in the case of an "equivalent" Ada code. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de