comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: C compiler warnings
Date: Tue, 5 Dec 2006 21:39:58 +0100
Date: 2006-12-05T21:39:51+01:00	[thread overview]
Message-ID: <1uc8198rdgo7z$.11cmjie0fd940.dlg@40tude.net> (raw)
In-Reply-To: 9Yjdh.1087752$084.448565@attbi_s22

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



  reply	other threads:[~2006-12-05 20:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-05  0:29 C compiler warnings Brian May
2006-12-05  4:24 ` Larry Kilgallen
2006-12-05 19:41 ` Jeffrey R. Carter
2006-12-05 20:39   ` Dmitry A. Kazakov [this message]
2006-12-06 15:03     ` Maciej Sobczak
2006-12-06 16:07       ` Dmitry A. Kazakov
2006-12-06 16:13       ` Maciej Sobczak
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox