Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You were not the first person to suggest Klemens's book to me, but after reading it, I disagree with most of it.


Did you read the first or second edition? The first edition had a lot of issues, the second edition was a lot better.


I'll have to check; it's on my bookshelf at work.


First edition.


Yeah the first edition wasn't so good. It got quite a big re-write for the second edition which came out quite quickly (in terms of a C book getting a second edition anyway).


why ?


It's hard to put my finger on exactly what it is I don't like about it. After rereading the table of contents I certainly don't disagree with some things (gdb, valgrind, version control, package management, are all good things).

I think my biggest beef is it seems to approach C as if it is a general purpose language, and I would argue that in the 21st century C is no longer a general purpose language. It is at its best now when used for systems programming, embedded programming, and making portable libraries (and the last is also no longer the exclusive domain of C, as besides C++ there are a couple other languages that can export C abi compatible functions and have unobtrusive runtimes).

Also, Klemens seems to like autotools. I don't hate autotools as much as others, as I remember a world before autotools was ubiquitous and it truly sucked. However, the combination of compilers not sucking like they used to (if you are using C99, you have a lot more features than you did on some crappy PCC derived vendor supplied compiler, even if you stick only to pure C99, and the odds of your compiler not "just working" on the C99 code is pretty slim) means that for simple projects a makefile that respects the CFLAGS, LDFLAGS, CC &c. is sufficient; for larger programs, there are serious alternatives to autotools. Obviously none of them are as dominant as autotools, but cmake is certainly prevalent enough to be a good place to recommend people start at.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: