32 years on, K&R's "The C Programming Language" still stands alone
11–20 of 70 posts
Re: 32 years on, K&R's "The C Programming Language" still stands alone
#12There 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/…
Re: 32 years on, K&R's "The C Programming Language" still stands alone
#13Earlier quoted context omitted.
The nontrivial differences are more interesting. To make declarations look similar to use was a gigantic mistake. http://cdecl.org/
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?Re: 32 years on, K&R's "The C Programming Language" still stands alone
#14The 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
#15Re: 32 years on, K&R's "The C Programming Language" still stands alone
#16Re: 32 years on, K&R's "The C Programming Language" still stands alone
#17There 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?
I'm using it as the textbook for a weekend C class I'm about to run for a bunch of Ruby/Java programmers, because CII basically gives you back all the data structures you have in Ruby that C "takes away" from you.
It'll also teach you a style of C development (ADT-centric, modular, heavy on function pointers) that holds up pretty well and is relatively modern.
Re: 32 years on, K&R's "The C Programming Language" still stands alone
#18Earlier 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?
Re: 32 years on, K&R's "The C Programming Language" still stands alone
#19There 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 I think you're being unfairly selective in your quoting of the original article. _Immediately_ after the part you excerpted, it continues: "(Er, assuming you have the patience to go on to accumulate a decade of experience leading to wisdom, taste, good judgement and technical intuition.)"
Re: 32 years on, K&R's "The C Programming Language" still stands alone
#20Earlier quoted context omitted.
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?
Why would you write code like this?