Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-lcc!ames!ucbcad!ucbvax!decwrl!tallis.dec.com!draper From: draper@tallis.dec.com (a keyboard? how quaint) Newsgroups: comp.lang.c Subject: Re: C Review Message-ID: <7582@decwrl.DEC.COM> Date: Thu, 15-Jan-87 11:20:59 EST Article-I.D.: decwrl.7582 Posted: Thu Jan 15 11:20:59 1987 Date-Received: Fri, 16-Jan-87 01:29:04 EST Sender: daemon@decwrl.DEC.COM Organization: Digital Equipment Corporation Lines: 65 i don't know who this guy is, but i think he's way off base here. > >"... 95% of all C programmers couldn't give you a good >explanation of the term lvalue..." there's some truth here, but i'd say it's considerably less than 95%, and that even then it's generally a case of knowing "how it works" but not knowing the specific terminology >"... Switch/case could be classified as rarely used and should be >kept till later. in favor of nested if-else's? semantically they may be equivalent and maybe a good compiler/optimizer generates equivalent code, but i find the switch-case to be much clearer (except possibly in some fall-thru case's). all (?) modern procedural languages have some kind of one-out-of-many case statement. >"... very few C programmers know much about sizeof..." how's this guy do portable dynamic memory allocation? >"... 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." he must not do much work under unix withor in general with complex data structures. (unless he's a fan of always typing "struct foo_struct foo;" or "int *(*function)()") >"... 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..." first of all, it isn't an intro book. second, it's not an "unmaintainable trick" --- it's a formal part of the language with consistent semantics across implementations. third, it's very useful in many circumstances --- for example in for loops >"... Pointers to functions ... few C programmers understand >them or would ever need them..." this is one of the more powerful features of the language. it lets you, for example, build fully generalized sorting routines where the caller provides a pointer to a comparison function. >"... a C programmer never needs to know what a byte is..." of course s/he does --- if s/he's going to use, or even understand, unions, for example. that's not to say that a byte must always be 8 (or 6 or 9 or . . .) bits. based on how this guy is trying to emasculate c to a mere shadow of itself, he'd probably uses a tractor-trailer truck to go to the corner store for a loaf of bread :^) bruce