Xref: utzoo comp.object:3221 comp.lang.misc:7493 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!cornell!uw-beaver!fluke!ssc-vax!dmg From: dmg@ssc-vax.uucp (David M Geary) Newsgroups: comp.object,comp.lang.misc Subject: Re: Run-time Type Errors in Smalltalk Message-ID: <3865@ssc-bee.ssc-vax.UUCP> Date: 17 Apr 91 19:54:18 GMT Sender: news@ssc-vax.UUCP Organization: Boeing Aerospace & Electronics Lines: 31 Originator: dmg@ssc-vax ] David Gudeman ]] Douglas Surber ]If they hadn't caught those errors by static typing they would have caught ]them by testing -- the same way the found the other 90% of the errors. ]This logic error combined with the strident tone of the article ]suggests that your convictions are affecting your thinking. ]]The real question is how long would it take them to catch those errors ]]by testing? The type checker catches them all first time every time. ]]Admittedly not every error, but reducing the number of errors by 10% ]]before you even begin testing sounds like a win to me. Sounds like a win to me, also. However, there are two caveats: 1) Since dynamic typing allows more expressiveness and a greater degree of reusability than a statically typed language, code in a statically typed language may be 10% (or more) larger than the "same" code in a dynamically typed language. So, while some errors have been ironed out before testing, testing may have more to test. 2) Errors caused by circumvention of the type system in a statically typed language may *not* be caught by the compiler, and are difficult to track down. In fact, I demonstrated such an error in an earlier posting. ]]Further, the type checker finds type errors even in code that, for one ]]reason or another, is never excersized during testing. Again not every ]]error, but a 10% reduction is still something. Again, realize that the type checker will not find errors that fall into category #2 above.