C Review
Brian Gordon
gordon at cae780.UUCP
Thu Jan 15 02:42:02 AEST 1987
Sorry to post, by my mailer couldn't grok "To: Peter Steele - Acadia" ...
In article <2313 at brl-adm.ARPA> Peter Steele - Acadia writes:
|I am currently finishing up a new text book on C with a colleague of mine and
|we just received the last of several technical reviews. This particular
|reviewer makes some statements that we find hard to accept. However, we're
|just two people, so we decided to get some opinions from other C programmers.
|Below is a list of some his statements. Is this guy for real? Your comments
|would be greatly appreciated. Incidentally, the text is not an intro text, it
|assumes the reader has finished a course in Pascal.
|
|"... 95% of all C programmers couldn't give you a good explanation of the
|term lvalue..."
I'd put it at 80%, but I believe it is HIGH in the non-academic world.
|"... Switch/case could be classified as rarely used and should be kept till
|later.
I don't know where you put it, but is is a "lesser used" control structure.
|"... very few C programmers know much about sizeof..."
Hard to believe. Doesn't everyone HAVE to use it, eventually, when dealing
with arrays and/or structures?
|"... 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."
Maybe the reviewer has never seen a 100,000+ line system? Or feels that
a book at this level is not applicable to that size effort? For a 200 line
program, typedef is not NEEDED.
|"... 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."
Too strong -- but out local coding standard SEVERELY restricts its use
for fear that it is too hard for a casual maintainer to interpret.
|"... Leave the comma operator altogether. An intro book is no place for
|obscure and unmaintainable tricks..."
The reviewer has the same worry about maintainability as the author(s) of our
coding standard. On the other hand, why argue FOR incompleteness?
|"... Pointers to functions ... few C programmers understand them or would
|ever need them..."
Again, maybe the reviewer has never seen -- or wishes to exclude -- 100,000+
line systems?
|"... a C programmer never needs to know what a byte is..."
Context dependent statement! Portable C code can be difficult when you
make any assumption/requirement on machine characteristics ...
FROM: Brian G. Gordon, CAE Systems Division of Tektronix, Inc.
UUCP: tektronix!cae780!gordon [or gordon at cae780.CAE.TEK.COM]
More information about the Comp.lang.c
mailing list