From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,904a7ecd269a9245 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!news.germany.com!news.belwue.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: C compiler warnings Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <9Yjdh.1087752$084.448565@attbi_s22> Date: Tue, 5 Dec 2006 21:39:58 +0100 Message-ID: <1uc8198rdgo7z$.11cmjie0fd940.dlg@40tude.net> NNTP-Posting-Date: 05 Dec 2006 21:39:51 CET NNTP-Posting-Host: 3d3be892.newsspool2.arcor-online.net X-Trace: DXC=lB]YRh9b?RcfF8a^:6>b7eA9EHlD;3Ycb4Fo<]lROoRaFl8W>\BH3Ybhk23ATak28iDNcfSJ;bb[eIRnRBaCd On Tue, 05 Dec 2006 19:41:57 GMT, Jeffrey R. Carter wrote: > Brian May wrote: >> This story, while not strictly related to Ada, might interest some >> people here. It seems to show that while Ada is going in one direction >> (strict compiler checking of code), C is going in the opposite >> direction (assume the developer knows what he/she is doing). > > Going in the opposite direction? C's basic design philosophy has always > been to make that assumption. It seems to me that the C compilers with > extensive warnings are the ones going in an unusual direction. The initial C design was. But its further evolution has always been in the direction of becoming more contract-based, more like Ada. The difference though was in the treatment of contracts. In C traditionally less attention was paid to enforcing the contract on both parties. The contract (nonull) was assumed on the callee's side, but ignored on the caller's one. The rationale probably was that C usually does not try to enforce the contracts at run-time (Ada does). This can explain why nonull was not attempted to check. It is not fully statically checkable. So why should we bother? > I wish > they'd all get rid of the warnings; then maybe more people would use a > well designed language. I don't think so. They just would use more and more tools instead. It is the tool chains which compensate language deficiencies. Just look around, people are ready to invest into tools, which should by sole magic compensate for everything, from the use of C++ to mismanagement. A tool might cost several thousands of dollars, and it could be dozens of them. Try to sell a compiler for that money. Something is deeply wrong in all this. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de