Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!odi!dlw From: dlw@odi.com (Dan Weinreb) Newsgroups: comp.object Subject: Re: Do we really need types in OOPL's? Message-ID: <1990Oct10.041259.1123@odi.com> Date: 10 Oct 90 04:12:59 GMT References: <0yw10qr@Unify.Com> <60700003@inmet> Reply-To: dlw@odi.com Organization: Object Design, Inc. Lines: 21 In-Reply-To: stt@inmet.inmet.com's message of 7 Oct 90 15:32:00 GMT In article <60700003@inmet> stt@inmet.inmet.com writes: In general, I would argue that if there are no machine-enforceable static constraints on a complex system, then the programmers themselves must have no idea whether any given line of code is right or wrong, except through (inherently infeasible) exhaustive testing. While I don't disagree with this, I'd like to point out that even if every single static constraint passes, the programmer still does not know (is that the same as "has no idea"?) whether the code is correct, has one subtle bug, or is ridden through with bugs. Many bugs are not found by static tests. So, while the checking of static constraints probably increases your confidence in the correctness of your code by some amount, you would still be well advised to test it -- including the parts that are rarely used -- to see if all the array references are within bounds, that you don't re-use freed storage, that there aren't logical errors at a higher level, and so on. The implied assertion above, that a lot of testing is needed in the absence of static checks but that testing can be dispensed with in the presence of static checks, is an exagguration.