Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!cbmvax!grr From: grr@cbmvax.cbm.UUCP (George Robbins) Newsgroups: comp.lang.c Subject: Re: C Review (left handed?) Message-ID: <1282@cbmvax.cbmvax.cbm.UUCP> Date: Thu, 22-Jan-87 21:44:03 EST Article-I.D.: cbmvax.1282 Posted: Thu Jan 22 21:44:03 1987 Date-Received: Fri, 23-Jan-87 21:15:44 EST References: <2313@brl-adm.ARPA> <1690@k.cc.purdue.edu> Reply-To: grr@cbmvax.UUCP (George Robbins) Organization: Commodore Technology, West Chester, PA Lines: 63 In article <2313@brl-adm.ARPA> Peter@adm.UUCP writes: >I am currently finishing up a new text book on C with a colleague >of mine... Well, I found about a million of these piled up in comp.lang.c and tried to resist - but - it's interesting. Your reviewer was obviously hopeless or in a foul and snappy mood but he indirectly does point at a few of the lingering problems with c...these are things that come up over and over again and send learners to the (hopefully) guru. >"... 95% of all C programmers couldn't give you a good >explanation of the term lvalue..." Well, maybe 30% couldn't get every one of the details right and perhaps 5% are terminally confused (check this newsgroup). >"... Switch/case could be classified as rarely used and should be >kept till later. BS here... >"... very few C programmers know much about sizeof..." Well everyone knows sizeof object, but sizeof pointers, expressions arrays, external items, parameters and whatnot needs to be explained or warned about... >"... 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." Well, many of the C texts, K&R included put more stress on #define and leave one wondering why you have both typedef and define. Discussion of typedef and examples of where it pays off are 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." >"... Leave the comma operator altogether. An intro book is no >place for obscure and unmaintainable tricks..." More BS, but the comma would seem to have bizarre semantics to anyone having just escaped pascal. Discussion should dissuade it's use except where it actually reduces confusion. >"... Pointers to functions ... few C programmers understand >them or would ever need them..." Clear discussion on how to declare pointers to functions and other complex types is needed. K&R tries, but give someone a broken compiler and let them try to work it out from the book! This is the spot to hammer typedef home again... >"... a C programmer never needs to know what a byte is..." Most programmers have picked this up by the time the try to learn C, so avoid the dumb analogy definitions and maybe discuss the relations between the char type and a byte, and why 8-bits isn't automatic... -- George Robbins - now working for, uucp: {ihnp4|seismo|rutgers}!cbmvax!grr but no way officially representing arpa: cbmvax!grr@seismo.css.GOV Commodore, Engineering Department fone: 215-431-9255 (only by moonlite)