Path: utzoo!attcan!uunet!mstan!amull From: amull@Morgan.COM (Andrew P. Mullhaupt) Newsgroups: comp.lang.c Subject: Re: ambiguous ? Summary: C Standard Not Sufficiently Appreciated? Message-ID: <456@s5.Morgan.COM> Date: 20 Oct 89 12:37:13 GMT References: <1989Oct17.203733.23121@utzoo.uucp> <14091@lanl.gov> <11337@smoke.BRL.MIL> Organization: Morgan Stanley & Co. NY, NY Lines: 40 In article <11337@smoke.BRL.MIL>, gwyn@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).