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,c406e0c4a6eb74ed X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Wed, 08 Sep 2004 19:12:51 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <49dc98cf.0408110556.18ae7df@posting.google.com> <6F2Yc.848$8d1.621@newsread2.news.pas.earthlink.net> Subject: Re: ADA Popularity Discussion Request Date: Wed, 8 Sep 2004 19:13:45 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Message-ID: <2L-dnRmP6qOePaLcRVn-ug@megapath.net> NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-IAOiFVchHnKtEWRi+S8lp4WiKOpfzIldMwUB/GVJSIdiextqWD3cuI2sn62J3o+ObQ4MPJ/thtBUNxC!50FOVYmT7T6N/Dr2yu1EKqmeGNVoOb/nihFXpWtLXuIxVQnvc9ftqDMTMb0Ot7Qia4EtI7jl/uv2 X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.13 Xref: g2news1.google.com comp.lang.ada:3517 Date: 2004-09-08T19:13:45-05:00 List-Id: "jayessay" wrote in message news:m3wtz7e4hd.fsf@rigel.goldenthreadtech.com... > kevin.cline@gmail.com (Kevin Cline) writes: ... > > I thought so too, until I tried incremental test-first development. > > Retesting a unit after adding a few lines of code means that type > > mismatches are caught immediately with or without strong typing. But > > it goes faster if you don't have to compile and link every iteration. > > Exactly. Actually this sort of development will save you much more > time and money than you could ever hope for from typical static typing. This seems like complete nonsense to me. (I'll admit that I've read other people making similar claims). The reason is that writing a good subprogram test takes on average 10 times as much code as is in the subprogram itself. That's because of the need to set up the needed global state for the preconditions, and the need to test all of the possible permutations of input. Making the test reusable and automatible adds even more effort. The best way to save time and money is to avoid the need to do that testing in the first place. We do that with Ada's strong compile-time and run-time checking, combined with occassional invariant assertions. And then we do extensive, repeatable system-level testing to find any logic errors. Our experience is that true logic errors (those that doesn't show up as compile-time or run-time checks) are very rare, probably less than 1% of all errors. (I'm omitting interfacing errors from this summary, because there you lose all benefits of Ada or for that matter any type system, even one as weak as C's. No language is going to help you there, but the real world is always going to insist on it...) If I had a stronger need for correctness, I'd move to something like SPARK, and do *all* of the checking at compile-time; I certainly wouldn't write more tests. Randy.