Path: utzoo!news-server.csri.toronto.edu!rutgers!sun-barr!cs.utexas.edu!usc!wuarchive!udel!haven!ni.umd.edu!uc780.umd.edu!cs450a03 From: cs450a03@uc780.umd.edu Newsgroups: comp.lang.misc Subject: RE: Runtime Polymorphism -- To Have and Have Not Message-ID: <12MAR91.18285477@uc780.umd.edu> Date: 12 Mar 91 18:28:54 GMT References: <607@optima.cs.arizona.edu> Sender: usenet@ni.umd.edu (USENET News System) Organization: The University of Maryland University College Lines: 53 Nntp-Posting-Host: uc780.umd.edu When I first hit this subject chain a couple days ago, I decided that David Gudeman was a breath of fresh air. I wanted to follow up immediately, but promised myself to wait till I'd read through to the end of the newsgroup before I posted. So, I'm responding to a large number of articles, and hopefully I'm remembering everything right. First, I get paid to maintain/develop code on a large system (gigabytes of data, millions of lines of code) on what Mr Gudeman would probably consider a strongly typed (runtime type checking) system. Quick summary of personal experience: The runtime errors I've run into include divide by zero array reference out of bounds file (or file system) full access denied (permissions set wrong) out of memory undefined variable Oddly enough, these errors tend to show up much more frequently in poor code than in good code, and in good code they generally only show up shortly after the code goes into testing. Oh yes, forgot a couple: race conditions data corruption An example of the last was when I changed a file naming convention from using a date encoded in the file name to using date as an independent property, ran a routine to convert existing files but had not actually installed the function that dealt with the new convention. I fail to see how a statically typed language would save me from any of these circumstances. At best, the language could forbid me from doing whatever operation caused the problem (array index out of bounds? well, you shouldn't be using array indices... use our Ronco brand array substitutes instead!) The more general problem of incorrect logic has only one good solution: (1) figure out what the problem is you are trying to solve (2) figure out how to solve it (3) implement it (4) check the implementation to be sure it is correct And if step 3 only takes me a few hours instead of a few days or a few weeks, well, maybe I'm "undisciplined", but we're beating our competition. Tough luck, huh? Raul Rockwell