C Review

a keyboard? how quaint draper at tallis.dec.com
Fri Jan 16 02:20:59 AEST 1987


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 with <sys/types.h> or 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



More information about the Comp.lang.c mailing list