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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,703c4f68db81387d X-Google-Thread: 115aec,703c4f68db81387d X-Google-Thread: f43e6,703c4f68db81387d X-Google-Attributes: gid103376,gid115aec,gidf43e6,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!newscon02.news.prodigy.com!newscon06.news.prodigy.com!prodigy.net!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada,comp.realtime,comp.software-eng Subject: Re: Teaching new tricks to an old dog (C++ -->Ada) Date: 11 Mar 2005 17:06:06 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <4229bad9$0$1019$afc38c87@news.optusnet.com.au> <1110032222.447846.167060@g14g2000cwa.googlegroups.com> <871xau9nlh.fsf@insalien.org> <3SjWd.103128$Vf.3969241@news000.worldonline.dk> <87r7iu85lf.fsf@insalien.org> <1110052142.832650@athnrd02> <1110284070.410136.205090@o13g2000cwo.googlegroups.com> <395uqaF5rhu2mU1@individual.net> <112rs0bdr2aftdf@corp.supernews.com> <1inxxr988rxgg$.1w9dedak41k89.dlg@40tude.net> <112s1r0rf0o8nca@corp.supernews.com> <112sonip5v4dca6@corp.supernews.com> <112t3de6fu04f38@corp.supernews.com> <112u7undo5h2q0a@corp.supernews.com> <399kbnF5vle0tU1@individual.net> <39bvv2F5ticm8U1@individual.net> NNTP-Posting-Host: shell01-e.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1110578768 5166 69.38.147.31 (11 Mar 2005 22:06:08 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Fri, 11 Mar 2005 22:06:08 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:9179 comp.realtime:1315 comp.software-eng:4883 Date: 2005-03-11T17:06:06-05:00 List-Id: Wes Groleau writes: > Pascal Obry wrote: > > Wes Groleau writes: > > > >>And notice that Pascal did NOT have to suppress safety checks > > I did: -gnatp. > oops. Might be interesting (if somebody has too much time > on his hands) to explicitly write all the checks into the > C that are automatic in Ada and compare times. Ada will win > because the compiler can optimize out more of the checks > when they are not explicit. Actually, I doubt that. I'm a compiler writer. In my opinion, the issue is how much information is available to the compiler. The explicitness vs. implicitness of the checks is usually irrelevant to whether they can be optimized away. To optimize-away a check, whether explicit or implicit, requires the compiler to prove the check can't fail. Compilers tend to be stupider, but more meticulous, in doing so, than human programmers. > Also, the compiler is less likely to make typos on the checks > it does not optimize away! Yes, I agree with that. > -- > Wes Groleau > > Answer not a fool according to his folly, > lest thou also be like unto him. > Answer a fool according to his folly, > lest he be wise according to his own conceit. > -- Solomon > > Are you saying there's no good way to answer a fool? > -- Groleau Heh. I'm not calling you a fool. Can I instead merely disagree about what compilers are typically capable of? - Bob