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,703c4f68db81387d X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!wn13feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Teaching new tricks to an old dog (C++ -->Ada) From: Jim Rogers References: <4229bad9$0$1019$afc38c87@news.optusnet.com.au> <422b6c80.1141685927@news.xs4all.nl> <1110151210.176045.168760@o13g2000cwo.googlegroups.com> User-Agent: Xnews/5.04.25 Message-ID: Date: Mon, 07 Mar 2005 02:04:20 GMT NNTP-Posting-Host: 12.73.180.68 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1110161060 12.73.180.68 (Mon, 07 Mar 2005 02:04:20 GMT) NNTP-Posting-Date: Mon, 07 Mar 2005 02:04:20 GMT Organization: AT&T Worldnet Xref: g2news1.google.com comp.lang.ada:8791 Date: 2005-03-07T02:04:20+00:00 List-Id: "Paul E. Bennett" wrote in news:d0g4dp$og$1$8300dec7@news.demon.co.uk: > jimmaureenrogers@worldnet.att.net wrote: > >> Ada does not replace rigorous testing or code reviews. It supplements >> them. Code reviews are extremely helpful. They also consume a lot of >> time for the development team when they are done well. It is best to >> remove as many silly errors from the code through automatic analysis >> before exposing the code to developers for review. > > Thanks for that Jim. At least you seem to have been the first > (assumed) Ada user that has admitted that the compiler is not the > final arbiter. That is a fair assumption. I have been using Ada for over 10 years. Ada compilers are extremely helpful in finding a lot of errors that could be very time consuming to find during testing. One of the reasons Ada compilers can find a lot of problems not found by compilers for other languages is due to the syntax of Ada itself. The syntax, when Ada is used as the language is intended to be used, provides a very rich source of information about how you want to use various types and objects. For instance, in C++ you can create a bounded integer class. The compiler has no understanding of what you are trying to achieve. You are responsible for writing all the range and validity checking routines. Ada provides syntax understood by the compiler, for the definition of bounded integers. The compiler writes all the range and validity checks for you. It also recognizes that two different types are different. They are not to be mixed unless you explicitly direct that mixing. This need to be explicit also makes code reviews much easier. Any reviewer can clearly identify when you are mixing types in a way that violates your own design. Jim Rogers