Xref: utzoo comp.lang.c:26566 comp.software-eng:3056 Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!rutgers!mcnc!rti!trt From: trt@rti.UUCP (Thomas Truscott) Newsgroups: comp.lang.c,comp.software-eng Subject: Re: C Community's Cavalier Attitude On Software Reliability Summary: Every language needs a "lint" Message-ID: <3632@rti.UUCP> Date: 5 Mar 90 01:48:34 GMT References: <802@xyzzy.UUCP> <8230@hubcap.clemson.edu> Organization: Research Triangle Institute, RTP, NC Lines: 64 [insert favorite language bashing here] In C I have typed: for (i = 0; i < 100; i++) x[3][i] == 4; In Pascal I have typed: for i := 1 to 100 do; x[3][i] := 4; In Ada I have typed: for i in x'range loop x(3, i) := 4; end loop; These are all "legal", but obviously not what I wanted. A "lint"-like program, ideally the compiler itself, could have warned me about these mistakes, saving me a lot of trouble. The C language (its formal definition) isn't especially dangerous. But "C" (the practical definition) is typically extremely dangerous, thanks to compilers that happily generate code for: *iwonder++; /* why mycode(); /* doesn't */ work = 1<