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…
I'm reading it for the first time right now, and without nostalgia, at 100 pages in I'm very impressed.
32 years on, K&R's "The C Programming Language" still stands alone
61–70 of 70 posts
Re: 32 years on, K&R's "The C Programming Language" still stands alone
#62The thing that has always struck me about K&R is that it contains no fluff. You get so much information for each paragraph, that you often have to re-read them to get all the information contained therein. Probably the programming book I've used the most. In contrast, the C++ programming language is a mouthful, and ended up being just another pretty book on my bookshelf.
Stroustrop is, or at least in its later editions became, a pretty indespensable C++ book. Most of the topics in C++ are best addressed by it. Unfortunately, C++ is a nightmare of a language, so there are many, many topics, and you don't read it cover-to-cover any more than a cook would read New Pro Chef or McGee cover-to-cover.
Re: 32 years on, K&R's "The C Programming Language" still stands alone
#63It was written in a different era where publishers weren't inflating page counts for sales.
It doesn't hurt that the total number of constructs in K&R C is really quite small. I'm not sure there are any current languages with comparably few constructs; maybe Arc. Even Scheme is bigger, at least for a recent version (say, R6RS).
Still, Scheme does try to address a lot of higher level things, e.g. the full numeric tower, whereas C shines as a universal very close to the metal assembler.
Re: 32 years on, K&R's "The C Programming Language" still stands alone
#64It was written in a different era where publishers weren't inflating page counts for sales.
It doesn't hurt that the total number of constructs in K&R C is really quite small. I'm not sure there are any current languages with comparably few constructs; maybe Arc. Even Scheme is bigger, at least for a recent version (say, R6RS).
Of all the C++ books, there was a C++ in 10 minutes from SAMS that was small, dense packed, and informative. It was really weird coming from them.
Re: 32 years on, K&R's "The C Programming Language" still stands alone
#65How does it compare to C Programming: A Modern Approach, by K.N. King? That was great for learning C. Very readable.
Really, downmodded for politely asking an honest question? Had anyone used both? Will I get downmodded for asking another question?
Re: 32 years on, K&R's "The C Programming Language" still stands alone
#66Earlier quoted context omitted.
The point is not that, but that as soon as you make slightly nontrivial declarations it is not readable in one pass.
If that's what you consider "slightly nontrivial", I never want to see what you would consider a difficult type declaration.
Re: 32 years on, K&R's "The C Programming Language" still stands alone
#67Earlier quoted context omitted.
C's syntax is much more terse than Pascal's; whether that makes it better or worse is open to discussion. begin...end or {...} ? I would argue that Pascal's syntax is easier to learn, but that C's is easier to use once learned. And since I spend more time using languages than learning them, the latter is more important to me.
In the 80's we used to say: "You can't compare Pascal to C. It's like comparing a bicycle with training wheels to a ten-speed racing cycle."
Lacking brakes.
Re: 32 years on, K&R's "The C Programming Language" still stands alone
#68Earlier quoted context omitted.
Really, downmodded for politely asking an honest question? Had anyone used both? Will I get downmodded for asking another question?
Kneejerk downmodding has become somewhat epidemic recently (in the last few months?). Most of the time more thoughtful users tends to correct this problem later on, though.
Re: 32 years on, K&R's "The C Programming Language" still stands alone
#69There 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/…
@tptacek and others on this thread, what books do you suggest to learn modern C programing? I am an experienced programmer, but all of my experience has been with JVM languages. I would like to be able to read and debug C/C++ programs - so which books provide a good start on idioms, libraries and tools?
Re: 32 years on, K&R's "The C Programming Language" still stands alone
#70Earlier quoted context omitted.
Kneejerk downmodding has become somewhat epidemic recently (in the last few months?). Most of the time more thoughtful users tends to correct this problem later on, though.
It probably helps that downvoting is only possible for newer posts (at least from my perspective), while upvoting is always possible.
It would be interesting if we had a voting system, that worked a bit like eBay's `bidding agents'. I.e. a system where you vote by setting a target score, and the system casts an up- and downvote as necessary. Of course we would need those base-votes to be recastable (but only automatically).
The current system is a special case of this, where the target score is either plus infinity or minus infinity, and you can't change the target score once set.
P.S. Please forgive my off-topic ranting in this discussion about K&R.