Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: comp.lang.c Subject: Re: C Review Message-ID: <7521@utzoo.UUCP> Date: Wed, 14-Jan-87 14:02:14 EST Article-I.D.: utzoo.7521 Posted: Wed Jan 14 14:02:14 1987 Date-Received: Wed, 14-Jan-87 14:02:14 EST References: <2313@brl-adm.ARPA> Organization: U of Toronto Zoology Lines: 71 My guess is that this reviewer is an academic (obviously he is not a professional C programmer) who learned C a very long time ago and has never used it much or made much effort to keep up to date with the language. Having said that, I should mention my background: I first learned C about 12 years ago and have been working in it ever since, much of the time as a professional C programmer. > "... 95% of all C programmers couldn't give you a good > explanation of the term lvalue..." This is probably true, but the concept is important and needs mention. I see no convenient way to do this without the term. What he probably is thinking of is that experienced C programmers have forgotten the term because they have an intuitive understanding of its implications. True, but irrelevant. > "... Switch/case could be classified as rarely used and should be > kept till later. Nonsense, it's fundamental -- more so than some of the odder control constructs like "continue" and "do{}while()", in fact. > "... very few C programmers know much about sizeof..." How much is there to know? Anyone using malloc should be using sizeof. > "... 99% of all professional C programmers have no idea > what typedef is all about, couldn't care less and probably > won't ever need it." Professional C programmers have to know what typedef is about, since they will be called on to maintain code that uses it someday. There is quite a substantial subset of C programmers, particularly the ones who have been around since pre-typedef days, who very seldom USE typedef. Macros suffice for typedef's most common uses. However, there are certain jobs, such as de-cryptifying complicated declarations, where there is just no adequate substitute. It is important that new C programmers know what typedef is about, even if they don't use it often. > "... 99% of all professional C programmers have no idea > what the comma operator is all about, couldn't care less and > probably won't ever need it." Again, professional C programmers have to know what it's about since they will run into it in other peoples' code someday. The comma operator is not the most useful thing in C by a long shot. It is convenient from time to time, but its real importance comes in very specialized situations. Again, this is something C programmers should at least hear about briefly so that they can read strange code. > "... Pointers to functions ... few C programmers understand > them or would ever need them..." Utter nonsense, there are quite a number of situations where they are both useful and important. Most C programmers have at least a superficial understanding of them, although there are certainly some minefields when it comes to complex declarations involving them (this is one place where typedefs become very useful...). > "... a C programmer never needs to know what a byte is..." He's going to have trouble understanding the full semantics of frequently- used primitives like "read" without some grasp of fundamental memory organization, including the nasty word "byte". People doing limited sorts of programming with all i/o via stdio could get away without it. People doing serious C work, especially systems programming, and especially work requiring reading other peoples' code, need to understand what bytes are and how they tie in with things like read() and fread() and sizeof. -- Henry Spencer @ U of Toronto Zoology {allegra,ihnp4,decvax,pyramid}!utzoo!henry