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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,fc52c633190162e0 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!y66g2000hsf.googlegroups.com!not-for-mail From: "Case Crab" Newsgroups: comp.lang.ada Subject: Re: why learn C? Date: 29 Mar 2007 23:30:12 -0700 Organization: http://groups.google.com Message-ID: <1175236212.771445.135460@y66g2000hsf.googlegroups.com> References: <1172144043.746296.44680@m58g2000cwm.googlegroups.com> <1172161751.573558.24140@h3g2000cwc.googlegroups.com> <546qkhF1tr7dtU1@mid.individual.net> <5ZULh.48$YL5.40@newssvr29.news.prodigy.net> <1175215906.645110.217810@e65g2000hsc.googlegroups.com> <1175230352.808212.15550@e65g2000hsc.googlegroups.com> NNTP-Posting-Host: 76.183.124.36 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1175236214 2699 127.0.0.1 (30 Mar 2007 06:30:14 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 30 Mar 2007 06:30:14 +0000 (UTC) In-Reply-To: <1175230352.808212.15550@e65g2000hsc.googlegroups.com> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: y66g2000hsf.googlegroups.com; posting-host=76.183.124.36; posting-account=CRhfgw0AAACAESMPtOaK1QUiwpMf4TsJ Xref: g2news1.google.com comp.lang.ada:14674 Date: 2007-03-29T23:30:12-07:00 List-Id: On Mar 29, 10:52 pm, "jimmaureenrog...@worldnet.att.net" wrote: > On Mar 29, 6:51 pm, "kevin cline" wrote: > > > No, what actually happened is that expert C++ developers learned to > > use C++ in such a way that those errors can not happen. While it is > > possible to write unsafe code in C++, it is also possible to adopt > > coding guidelines that makes it easy to find and eliminate unsafe > > code, and for most applications, that's quite good enough. > > Coding guidelines cannot by themselves prevent any errors. Really? I have found that coding practices can preclude certain classes of errors. > For example, > the JSF AV C++ Coding Standard, which is intended to limit the unsafe > features of C++, contains 221 rules. How many rules distinguish SPARK from the full Ada language? > It is not possible to check > 6 million lines of code against 221 rules by hand in any timely or > economical manner. I expect that most of the checking can and will be done automatically. In any case, I would expect such mission-critical code would be inspected, regardless of whether the implementation language is C++ or Ada. > > The NASA Ada Flight Software coding guidelines contain 14 rules. > The intent of both coding standards is to produce software safe enough > to use for airborne avionics systems. Interesting that one organization has 221 rules while the other has only 14. > Coding standards can help up to a point. When the coding standards are > oppresively complex they cease to help. Compile-time checks can also help, up to a point. But they don't solve the whole problem.