Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC840302); site boring.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!teddy!panda!talcott!harvard!seismo!mcvax!boring!steven From: steven@boring.UUCP Newsgroups: net.lang Subject: Re: levelheight Message-ID: <6292@boring.UUCP> Date: Mon, 21-Jan-85 12:17:06 EST Article-I.D.: boring.6292 Posted: Mon Jan 21 12:17:06 1985 Date-Received: Wed, 23-Jan-85 06:04:49 EST References: <2340@hplabsc.UUCP> <4948@utzoo.UUCP> Reply-To: steven@boring.UUCP (Steven Pemberton) Organization: CWI, Amsterdam Lines: 40 Apparently-To: rnews@mcvax.LOCAL In article <4948@utzoo.UUCP> laura@utzoo.UUCP (Laura Creighton) writes: > I was once talking to someone and got the distinct impression that he > thought that a compiler that did a lot of checking should enable him to > write totally bug-free programs. This bothered me. Perhaps it was bravado, > but I feared he would never learn to check logic errors, on the assumption > that ``if it compiled, it would be fine.'' At a place I once worked at, they introduced a new Fortran compiler that did much more run-time checking. All of a sudden the manager was beseiged by people complaining about the new compiler because all of a sudden what used to be working programs no longer worked, and demanding that the old compiler be brought back. So it seems to be a property of people in general, rather than any particular language/compiler. > I wonder whether this is widespread. The problem with safety devices > is that people rely on them to do their thinking for them in situations > where they shouldn't. I don't think this is a property of safety devices. I don't get the impression that people drive worse if they're wearing a safety belt, for instance. I like to have safety devices in programs to protect me when my thinking fails, rather than to save me thinking. > Anybody done a ``Pascal programmers make X times as many logic errors > as C programmers'' type of survey? Someone did such a comparison between Pascal and Fortran a few years back in The Computer Bulletin, and found that Pascal programmers produced far fewer errors. > Hmm. Maybe if they don't have to worry about type checking they can think > more about logic errors. But I worry -- if you don't worry about type casting > then are you really thinking about writing code at all? It goes without saying that the earlier errors are spotted, the better. If it is possible to identify errors at compile time, so much the better, because you are going to spend so much less time debugging. I believe that programming languages can go much further in the help they give programmers than they do at present. For instance, it is possible to statically guarantee that nil pointers are never dereferenced (imagine the bugs that that would prevent!) but I know of no language that supports it. Steven Pemberton, CWI, Amsterdam; steven@mcvax.