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: 109fba,703c4f68db81387d X-Google-Thread: 115aec,703c4f68db81387d X-Google-Thread: f43e6,703c4f68db81387d X-Google-Attributes: gid103376,gid109fba,gid115aec,gidf43e6,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!g14g2000cwa.googlegroups.com!not-for-mail From: "Jerry Coffin" Newsgroups: comp.lang.ada,comp.lang.c++,comp.realtime,comp.software-eng Subject: Re: Teaching new tricks to an old dog (C++ -->Ada) Date: 23 Mar 2005 18:16:42 -0800 Organization: http://groups.google.com Message-ID: <1111630601.976052.35580@g14g2000cwa.googlegroups.com> 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> <1111607633.301232.62490@z14g2000cwz.googlegroups.com> NNTP-Posting-Host: 165.236.235.120 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1111630606 29900 127.0.0.1 (24 Mar 2005 02:16:46 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 24 Mar 2005 02:16:46 +0000 (UTC) User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: g14g2000cwa.googlegroups.com; posting-host=165.236.235.120; posting-account=mZiOqwwAAAC5YZsJDHJLeReHGPXV5ENp Xref: g2news1.google.com comp.lang.ada:9865 comp.lang.c++:46965 comp.realtime:1655 comp.software-eng:5259 Date: 2005-03-23T18:16:42-08:00 List-Id: Robert A Duff wrote: [ ... ] > By the way, *most* of the work a compiler does to optimize away > checks is the same as for other optimizations (despite what some > Ada fans have claimed in this thread), so optimizing away checks is > not as costly as you seem to think (in terms of compiler-writer's > effort). First of all, I'm not saying the cost is necessarily particularly high, only that _very_ few things are free, even when the cost isn't necessarily obvious. Second, as far as the optimization itself goes, it should be basically constant folding followed dead-code elimination. It's certainly true that most optimizing compilers are already likely to include both, and it's also true that techniques for both have been well-known for some time (I'm pretty sure the Dragon book includes examples of each). Nonetheless, while doing them to at least some extent is well-known, each is typically open to at least some improvement. At least to me, it appears that producing efficient output from Ada source code depends more upon them being done well than is the case for most other languages. > > Some areas are somewhat more questionable -- calling a class a > > "tagged record" is clearly a mistake, ... > > Sorry, but if you think a class is called a tagged record in Ada, > you don't understand the language. I'll openly admit that my knowledge of Ada 95 is _extremely_ limited (I'm afraid I quit using Ada before 1995). Perhaps I need to take another look in this area. OTOH, doing a bit more looking, if I've misunderstood the situation, at least I have some company. For example: http://en.wikibooks.org/wiki/Programming:Ada:Types:record claims that "The tagged record is what in other languages is called a class." Likewise: http://www.adaic.com/docs/95style/html/sec_9/9-2-1.html while less explicit about the equivalence, makes statements that certainly make a tagged record look and sound a great deal like a class in C++. Perhaps you can provide a better explanation? -- Later, Jerry. The universe is a figment of its own imagination.