Live data from Hacker News

32 years on, K&R's "The C Programming Language" still stands alone

reprog.wordpress.com

21–30 of 70 posts

Re: 32 years on, K&R's "The C Programming Language" still stands alone

#21
post #9

There is, essentially, nothing to be known about C beyond what is in this book. If you can read those 272 pages, and understand them all, then you are well on the way to being a C wizard. Say what? This is like saying that once you know what all the commands in Illustrator do, you're well on your way to being a professional illustrator. The reason that K&R is so small is that so much of C programming happens outside/…

But if everything you need to know about C is in K&R, how do you implement a balanced tree?

Read a good algorithms text to learn about balanced trees. Once you understand what one is, you ought to have learned enough about C from K&R to be able to implement one in C.

Re: 32 years on, K&R's "The C Programming Language" still stands alone

#22
post #9

There is, essentially, nothing to be known about C beyond what is in this book. If you can read those 272 pages, and understand them all, then you are well on the way to being a C wizard. Say what? This is like saying that once you know what all the commands in Illustrator do, you're well on your way to being a professional illustrator. The reason that K&R is so small is that so much of C programming happens outside/…

Being a C wizard doesn't mean you know how to implement a balanced tree. It means that if you understand a concept, like a red-black tree for example, then you can efficiently implement it in C.

Re: 32 years on, K&R's "The C Programming Language" still stands alone

#23
K&R is overrated, just like many "cult" books are. I read C: ARM by Harbison and Steele and after trying to read K&R I stopped because I wasn't getting anything new out of it.

Edit: Further proof of this is the blind downvoting typical of critiques of "cult" books. K&R just happened to be there at the right time and it was the first programming book for many people. Their nostalgia makes them think that it is a very good book, when in fact is a simple book that describes a simple language. Nothing bad about that, but nothing spectacular either.

Re: 32 years on, K&R's "The C Programming Language" still stands alone

#24
I personally find Steele's C: A Reference Manual far more useful in day to day hacking.

But, that's one of four Steele-authored language specs I look at frequently (Common LISP, Scheme, and Fortress), so I might just have carefully tuned my search methods to his writing style.

Re: 32 years on, K&R's "The C Programming Language" still stands alone

#25
post #20
post #18

Earlier quoted context omitted.

Why would you write code like this?

The point is not that, but that as soon as you make slightly nontrivial declarations it is not readable in one pass.

Well, the K&R book talk about the complicated declarations, and recommend the use of the typedef command. Also, it contains a simple program called "dcl", analogous to what you linked.

Re: 32 years on, K&R's "The C Programming Language" still stands alone

#26
post #13
post #8

Earlier quoted context omitted.

How is it a mistake? In C, if you know how to use it, you know how to declare it, and if you know how to declare it, you know how to use it. I don't see how one can make even a remotely plausible case that doing it otherwise would be an improvement.

char * (*(** foo[][8])())[] declare foo as array of array 8 of pointer to pointer to function returning pointer to array of pointer to char Which do you prefer reading?

They're both equally illegible to my eyes!

Re: 32 years on, K&R's "The C Programming Language" still stands alone

#27
post #21
post #9

There is, essentially, nothing to be known about C beyond what is in this book. If you can read those 272 pages, and understand them all, then you are well on the way to being a C wizard. Say what? This is like saying that once you know what all the commands in Illustrator do, you're well on your way to being a professional illustrator. The reason that K&R is so small is that so much of C programming happens outside/…

But if everything you need to know about C is in K&R, how do you implement a balanced tree? Read a good algorithms text to learn about balanced trees. Once you understand what one is, you ought to have learned enough about C from K&R to be able to implement one in C.

Java programmers don't need to read algorithms books to get sorted-access lookup tables. That's all I'm saying.

Re: 32 years on, K&R's "The C Programming Language" still stands alone

#29
post #27
post #21

Earlier quoted context omitted.

But if everything you need to know about C is in K&R, how do you implement a balanced tree? Read a good algorithms text to learn about balanced trees. Once you understand what one is, you ought to have learned enough about C from K&R to be able to implement one in C.

Java programmers don't need to read algorithms books to get sorted-access lookup tables. That's all I'm saying.

And software managers don't need to know anything to tell you to write a program - I wouldn't brag about knowing Java here in 'C' land ;-)

Re: 32 years on, K&R's "The C Programming Language" still stands alone

#30

I personally find Steele's C: A Reference Manual far more useful in day to day hacking. But, that's one of four Steele-authored language specs I look at frequently (Common LISP, Scheme, and Fortress), so I might just have carefully tuned my search methods to his writing style.

But Steele isn't much thicker. It's not hard to see that he was sticking to the K&R philosophy .
Post reply on HN