Live data from Hacker News

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

reprog.wordpress.com

31–40 of 70 posts

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

#31

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.

i never realised that was the same guy steele! (to be fair, it's harbison and steele, so he's second author and it's not clear how much was his work).

i've mentioned preferring this book over k&r here before, but as someone pointed out they do slightly different things - k&r is more about teaching how to use c.

but apart from all that, how come you get to use fortress frequently? what are you doing? is it becoming more popular? has it survived oracle?

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

#32
post #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…

"a simple book that describes a simple language" -- this, and this alone is worth all the praise it gets. It's one of the best books I've read as far as getting out of your way and letting you learn the language. No silliness, no wasted space. It is a super efficient book that gives you everything you need to get started.

I'm glad the other book worked for you though!

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

#33
post #17

Earlier quoted context omitted.

@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?

_C Interfaces and Implementations_ by David Hanson. 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.

Reading that at the moment to improve my C style. It's excellent.

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

#34
post #2

Very nice semantics, but hideous syntax. Pascal had it done right with a more linear declaration syntax. C looks like lisp in a bad way if you make slightly nontrivial declarations. Of course to make matters worse somebody went on and made C++, which must be the most hideous language ever to evolve, possibly because its creator borrowed heavily ideas from how his native natural language Danish was formed; It is mostl…

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.

C's type syntax for functions, pointers and arrays is terrible; it was an experiment that failed. C++ made it worse when introducing references and cv-qualifiers.

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

#35
Ah... this book brings back memories for me. This is the only programming book that I read till the end three times, not to mention the countless other times I use it for reference. The only book that can almost match this book is Effective Java Programming.

These are the only two books I bought _after_ reading them from front to back as they are a must have for my library.

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

#36
post #10

Earlier quoted context omitted.

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.

The copy of Stroustrop's book I have has all of the program text in a proportional, italic font. It was murder on the eyes.

[deleted]

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

#37

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 .

Not really, unless page count is your only metric. If you've read any of Steele's other language definition books (I've read all of the first Common Lisp one and some of the Java 3rd edition), you'll see it's clearly in the same style as the others. Also not entirely like the Scheme Revised Reports, which really set the standard for conciseness ^_^.

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

#38

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.

I found K&R great ... until I got to the arrays and pointers chapter. It wasn't my inability to get the concept, I think, the Lions' Commentary n UNIX 6th Edition, with Source Code which I tried next did the trick.

And nowadays I too keep Harbison and Steele handy, I lost track of my copy of K&R sometime in the '80s.

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

#39
post #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…

They're different books for somewhat different purposes. Harbison and Steele was written because Tartan Labs (CMU (compiler gods) spinoff) needed a strict definition of the language suitable to use for implementing it. And that's what Steele has done with all his language refs (well, I haven't looked at the Fortress one yet).

K&R ... I don't know. To really judge it, I'd want to e.g. look at the Algol 60 spec, and some inbetween.

Anyway, I'm not sure it's a "cult" book, but I do agree it's overrated (see my other comment; at the time I found the Lions' Commentary to be the better tutorial, but it had that tiny problem of being samizdat).

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

#40
post #10
post #7

The 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.

The growth from the first edition (skinnier than K&R as I recall) to the third astonished me.
Post reply on HN