Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

K&R

Name: Anonymous 2011-10-04 15:45

Well I just finished reading K&R. I got it for my machine structures class in Fall '09, but we were never assigned any exercises out of it so I never bothered reading it because I already knew C. Since then, I've read several mentions of what a great book it is from the likes of Linus Torvalds and Rob Pike among others, so I decided to give it a read.

My impression: what...the...fuck? Are you serious? The examples in K&R are often cited as ``the official way to code in C,'' but 90% of them are badly designed on purpose so they only utilize features that have been introduced up to that point in the book. That may make it a great beginner's book, I guess, but as a reference or example of best practices, lolno.

Name: Anonymous 2011-10-04 15:59

>>2
It's illogical to say that. According to K&R, which of these is correct?


void print(char s[]);
void print(char *s);


The book uses both. Of course, the first is only used until pointers are introduced, so the latter is obviously correct. But the fact that the book has so many conflicting style and design practices makes it unacceptable as a guideline.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List