ambiguous ?

Andrew P. Mullhaupt amull at Morgan.COM
Fri Oct 20 22:37:13 AEST 1989


In article <11337 at smoke.BRL.MIL>, gwyn at smoke.BRL.MIL (Doug Gwyn) writes:
> 
> The looseness in the C language definition is deliberate,
> because C was designed for systems programming,
> where it is important for the compiler to produce simple,
> fast code without undue constraints.
> Nevertheless, there are sufficient rules that programs
> that follow the rules will be highly portable.

Doug, you seem to have the most level-headed approach to C and its
forthcoming standard. I don't like much about C, but I don't want
to just bash it here. I want to ask you:

    OK, so how can I avoid following commonly available bad rules or
mispractices in C programming? I have for years programmed in Pascal
(and several other languages - none of 'em perfect, either...) but
C poses a steeper learning curve than any other. (I am now employed
to program extensively in APL2, which comes in second.) I am not
satisfied with writing merely functional programs; I want them to 
be clear and clean and run everywhere. I want them to be easy to
maintain and upgrade. Where can I turn to get the kind of advice
Doug Cooper hands out in his book "Standard Pascal"? I have found
Harbison and Steele to be the best so far, but other, highly expert
C programmers I know cringe at the idea of learning to program C from
"That Lisp Guy". Should I worry about this?

   Also: is there a logical exegesis of a fairly full subset of C? 
For example, a set of proof rules in the literature somewhere? I
have for years been complaining about the difficulty of unbound
pointers in this regard, but I am perhaps out of date. (Did the 
ANSI standardization affect this problem? I'm pretty sure it
didn't, but I cannot give an authoritative reference.) There
have been graduate courses for years where every jot and tittle
of PL/I or Algol 68 are thrashed out in agonizing detail. Anyone
ever done this for C? 

    I'm not suggesting that PL/I or Algol 68 are better languages;
(attempt to cut down on flamage here), I just want to know where can
I get the straight dope on C short of the standard itself, (if
possible).



More information about the Comp.lang.c mailing list