Hacker News new | past | comments | ask | show | jobs | submit login
The Definitive C++ Book Guide and List (stackoverflow.com)
80 points by helwr on April 15, 2011 | hide | past | favorite | 20 comments



Somehow I got hold of a link to Yossi Kreinin's 'Frequently Questioned Answers' (http://yosefk.com/c++fqa/index.html) - probably from HN, actually; so I felt duty-bound to add it to SO's C++ Tag Info (http://stackoverflow.com/tags/c%2b%2b/info; awaiting moderation).

(From a former C++ lover who is now much more comfortable programming in C again...)


I have read this FQA when it first appeared and I didn't find anything noteworthy in it (except the author's bias and visceral hate).

This is empirical (HN, reddit), but I've noticed that people who recommend the FQA usually have a poor understanding of C++.


While I don't claim to be an expert (I haven't used C++ for the last six or so years, and I only have about five or six years experience in using it), I'd like to think I have better than a 'poor' understanding of it.

Interestingly for me, when I read the FQA last week for the first time, I didn't find anything noteworthy in it either. It basically resonated with me as more of a series of well-argued (IMHO) 'things that I always knew but had never really attempted to explain' statements.

The author is, of course, biased towards not promoting the language; and I guess I've gone down that road, too.


I have read comp.lang.c++(.moderated) for years, and I have never seen a language where the most experienced programmers have to read up the standard to answer a question. Many points raised in the FQA are valid (although written in an inflammatory manner), the main point being that C++ is full of corner cases, traps, and historical artifacts.

IMO C++ is a language that we just have to live with. It's ugly, but there's lots of legacy software written in C++, and the only viable option if you need to optimize a lot while still keeping proper typing.


I like C++, but one valuable thing I took from FQA was a concrete example of how absurdly difficult C++ is to parse. Everyone "knows" how hard it is to parse C++, but this specific example was really eye-opening to me: it's a program which can have two completely different parse trees depending on the result of a sizeof() expression!

http://yosefk.com/c++fqa/web-vs-c++.html#misfeature-3


If you're basically familiar with C++ and want one good book, Effective C++ is the way to go. Quite simply, it teaches you how (and why) to write good, idiomatic C++ code, one rule at a time.


completely agree.

read it when you start c++, then read it 6 months later. it will feel like you are reading a completely different book :)


When I was learning C++ I subscribed to a great magazine called the "C++ Report". I first read about expression templates and template meta-programming in that magazine (Todd Veldhuizen's articles on Blitz). I blew my mind that people could use templates that way. Too bad it took many years to get my hands on a compiler that could actually handle templates well enough to use those techniques :-)

I'm not necessarily recommending reading those articles today - they are pretty dated. Still, it was wonderful to read about the techniques as they developed.


You know what is sad? I've read them all before I knew there were other programming languages! I say it's sad because the time spent reading that - thinking that would make me a better programmer - was wasted as I could have learned higher level languages. Still, from time to time in my life, when I need to get a C+ job done, it helps to be able to understand it. Also, it helps in interview questions where they seem to pick question from effective or exceptional ;)


i.e: "I now prefer higher level languages, but my hard-gained C++ knowledge is still useful sometimes".


You say funny things. Not everything can be built with high-level languages. Some people work on operating systems, others on database systems, etc. So stop this nonsense, I have some breaking news for you: not everyone writes web applications these days.


Couchdb is written in Erlang, which also powers a 3d software program. Java with a jit compiler is as fast as C++ for digital signal processing.

And ocaml is considered faster than C++, Stalin can compile Scheme to faster than c.


Both Erlang VM and HiPE are written in C, which powers.. The point is not who powers which software program, the point is that you cannot write operating systems and drivers in Java. I hope you realize that Java gets run inside a vritual machine. And so is Erlang. Also C and C++ power a number substantially bigger than "a 3d software program", if you want to put it like that, which isn't the point..


A virtual machine means nothing. There exists chips that natively run Java and you could in principle run x86 on a PPC with a suitable virtual machine.

And realtime Java does allow you to specify drivers.

The Symbolics Lisp Machine ran everything in Lisp, top to bottom.


> Java with a jit compiler

The JRE is substantially C++.


Not all JREs are - Jikes RVM for example is implemented in Java and yet has decent performance -

http://jikesrvm.org/FAQ#FAQ-GeneralWhatIs


The speed-critical parts (like HotSpot) are most certainly written in C++.


From TFA I linked -

Jikes RVM is unique in that it is the first self-bootstrapped virtual machine written entirely in the Java programming language, i.e., its Java code runs on itself, without requiring a second virtual machine.


"You say funny things", "Stop this nonsense", "some breaking news for you" -> Not needed to prove your point.

I never said that C++ was not useful, neither that it was not a good programming language or not in use today. In fact, of all the offers I receive, half of them are in C++. And I don't think everyone writes web applications.

I said that I was wrong thinking that I would become a better programming by reading those books. I would become a more technical C++ programmer, but not a better programmer. By learning other languages, helping other communities and understanding their philosophies, I get a different perspective on C++. It's like trying to understand the humanity by sticking in your city instead of traveling around the world.

So, I understand now why Meyers suggest using Fonctor and High-Level STL functions instead of for-loops. I understand that Andrei Alexandrescu, in Modern C++ Design, based its TMP on Lisp cons principles. I understand the advantage - and disadvantage - of compiling.

Do you use raz0r (4 karma for 500+ days?!) when you are frustrated and want to bash on something?


once you've read these books, take a look at altdevblogaday.org

they have daily blog posts from excellent game developers.

although i'm not a c++ game developer, i do use c++ and i take a lot of inspiration from the techniques that they talk about on that site.




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

Search: